So I have a dynamically loaded button that is called with the following .live('click') event.
$('#page').live('pageinit', function() {
$('.email-button').live('click', function() {
// do button stuff
});
});
However the behavior is very odd. When the page is loaded and you try to click the button nothing happens. Then if you refresh the same page the click event fires. It's almost as if it's not binding the first time around. I have also tried the .bind
method as well as .live('vclick')
method but nothing works the first time the page load and I can't seem to figure out what is causing this. I thought I read something along the lines of using .create
but I didn't think it applied to me. Any leads in the right direction??