I’m using .load() to load other pages within my site into a div. Is there a way to add jquery ui enhancements to elements on the newly loaded page? I was thinking about using .delegate() or .live(), but can’t figure out what event to bind them to? Or is there a better way?
I’m using .load() to load other pages within my site into a div .
Share
You can use the callback functions provided by jQuery’s ajax function – for
load(), the syntax would look something like:Alternatively, look at the global ajax events, like
ajaxSuccessor use a plugin that extends jQuery’s existing ajax functions with functionality like the one you need such as this one: http://www.protofunc.com/scripts/jquery/ajaxManager/