views:

1111

answers:

1

Strange, is there no possibility to put several binds in jquery, on one element?

$('input').click(clickfn).click(clickfn)

I am using 1.3.2

function clickme() { alert('click me') }

$('.click', mod).bind("brrr", clickme).bind("brrr", clickme)
                .click(function() { $('.click', mod).trigger("brrr"); });

This is not working also. Executes one time.

+2  A: 

What you have there should work just fine… it does for me (also with jQuery 1.3.2). Try this:

$('input').click(function(ev){ alert('func 1'); }).click(function(ev){ alert('func 2'); });

When you click the input elements, you should see consecutive alerts appear. Perhaps you are returning false in the first function? This would stop event propagation, so the second handler wouldn't be fired.

As an aside, I see you're doing this to input elements, so you probably want to use the focus event instead of click.

obeattie
Your version is really working, I changed description.
dynback.com
I found what happened, it was deleting this element in first action.
dynback.com