Hi,

In your code, i think you call the function. You only need to put the name
of the function.
The code you wrote execute the function quickSearch then put the result as
the name of the function to bind to click

Like this :
$("#qSearchBut").click(quickSearch);

Pierre

Lily Tomlin  - "The trouble with the rat race is that even if you win,
you're still a rat."

2008/11/21 .mini.moke <[EMAIL PROTECTED]>

>
>
> Hi there,
>
> I'm pretty new to JQuery.  I have a couple of elements that need to call
> the
> same function so my code looks like this:
>
> $("#qSearchBut").click(quickSearch());
>
> Pretty simple I thought.  But this call executes the quickSearch() function
> on page load.  What fundamental thing am I overlooking?
>
> Thanks in advance
>
> Amanda
> --
> View this message in context:
> http://www.nabble.com/NEWB-ALERT%3A-Why-when-calling-a-pre-existing-function-from-.click%28%29-is-it-executed-on-page-load--tp20622218s27240p20622218.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>

Reply via email to