If all you want is a handler for a click on a element, use the click()
method:

$('#foo').click(function(){
alert('You clicked the foo element');
});


On Aug 28, 7:49 pm, dduck1934 <[EMAIL PROTECTED]> wrote:
> I had a quick question with the bind() method in jquery
>
> how do i use the bind to bind a function with arguments on an click
>
> $('#foo).bind('click',clickMe);
>
> function clickMe(x)
> {
>    alert(x);
>
> }
>
> i thought i could do this..
>
> $('#foo).bind('click',{x:'clicked'},clickMe);  but that doesnt work.
>
> Im sure this is easy, but i cant seem to find examples of this.
>
> thanks for your help.
>
> -Matthew

Reply via email to