With jQuery you get this function that fires when the document is nearly ready - it's displayed and maybe some resources are still getting fed from the initial page load (.JS files - whatever)...
At any rate - in this function I setup all these .Live event handlers.
The .acs-xxx.xxx business is referring to a CLASS on some HTML element. These HTML elements are not loaded yet onto the page - I do that as you call up records and such.Code:$(document).ready(function() { . . . $('.acs-panel-btn-add').live('click', addClick); $('.acs-panel-btn-delete').live('click', deleteClick); $('.acs-panel-btn-edit').live('click', editClick); $('.acs-panel-btn-open').live('click', openClick); $('.acs-operator-button-event').live('click', operatorClick); . . .
The point is that these LIVE jQuery EVENT handlers watch the DOM for new elements that might have these CLASS's on them. When I add those elements they auto-magically get wired to the EVENT handler function noted in the .live call above.
That's pretty cool stuff!!!




Reply With Quote
