i wanted to reload an element whenever there is a click event on any form element. can anyone help me with the jquery syntax?
something like
function addClickHandlers() {
$.publish('refreshDiv');
}
where the div’s reloadTopic is set to refreshDiv
thanks
Click events bubble up, so you can just set the event on the form element:
You could also use
.delegate()to only catch clicks from certain elements within the form: