I am trying to execute the alert message after the execution of the trigger event. My code :
$(".addpage").trigger("click").queue(function () {
alert($(".page:first-child").attr("id"));
});
But here problem is the alert is executing before completing the trigger event function. What i am doin wrong here?
Here i have done complete bins for above issue. please find demo link and check it out..
Demo: http://codebins.com/bin/4ldqp7m
HTML
jQuery
CSS:
Demo: http://codebins.com/bin/4ldqp7m