$(top.document).ready(function () {
$(document).not('#mymenu *').click(processAction);
});
function processAction();
this doesn’t seem to be working. any suggestions ?
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.
I wouldn’t try binding to every element on the page — very expensive and inefficient. I would use $().delegate:
This binds the event to the body. When a anything is clicked, the event bubbles up the DOM tree and is captured with this handler. If the original DOM element matches the selector, the function is called. This means only one bind, rather than potentially dozens.