Please what is the difference between using jquery .bind() to attach an event to a selector and simply calling an event directly e.g .click() or .change()
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no difference between
$().click(fn)or$().change(fn)and
$().bind('click',fn)or$().bind('change',fn)as in the background (jQuery source) the
clickandchangemethods usebindAlthough as pointed out in this answer -> jQuery: $().click(fn) vs. $().bind('click',fn);
You can use bind for multiple events