I have some elements which are generated on document load, and some which are generated dynamically via ajax calls.
The first ones are styled easily using
$(".btn").button()
I’m having a hard time styling the ajaxed buttons. If there was some event that was suitable, I would simply bubble to document level on load, something like this:
$(document).on("something",function(){
$(".btn").button()
})
I’ve tried using on “load” and on “ready”, neither works. Any ideas?
Edit: I can of course apply .button() on each ajax callback, but there is an easier way, right? 😉
you can use
ajaxSuccess():