ruby on rails 3 - jQuery ujs inside of a jquery modal not working -
i have of forms different controllers in jquery dialog modal box, , problem i'm running when modals loaded, ujs links(data-remote, data-confirm, etc) ignored jquery. i'm thinking when partials getting loaded through ajax, events aren't bubbling include new links added dom ajax. has run this? can't seem figure out way around it. can post code if wasn't clear...
if markup being added dynamically events going work if make use of event delegation.
there's pretty writeup on basics of event delegation in jquery here - http://jqueryfordesigners.com/simple-use-of-event-delegation/. you'll want switch handlers created through bind
use on
.
Comments
Post a Comment