I use the following selector and function:
$("form[name='qc']:last-child").live("focus", newTextLine);
when the :last-child will change, will the .live still be listening to the old :last-child?
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.
live(anddelegate) tests the selector when the event happens. If the element is not the last child when it is clicked, the handler won’t be executed.bind(and other methods that use it, such asclick), by contrast, tests the selector at the time of the binding, not of the event.