Hello I have a quick question.

I can launch javascript code like this through arrays:

arrayLinks[13]="javascript:LaunchKeyboard()";

** but how do I launch jQuery code through an array?**
arrayLinks[8]="??????????????";`

My jquery code is

$(function() {
var ele = $('#div1');
var speed = 25, scroll = 5, scrolling;

$('#scroll-down').mousedown(function() {
etc
}

Any advise would be great.

Thank you.

Recommended Answers

All 4 Replies

Just give your function a name and call it like you normally would.

So call it

$(function my() {

and then call it as javascript?

arrayLinks[8]="javascript:my()";

I have tried this with no luck.
I have also tried calling it from
> $('#scroll-down')
with no success.
I am new to jQuery thanks for your help.

James,

Need to know the bigger picture. What are you trying to achieve?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.