How to add id/class or name to this script
'joinlist' but I can't figure out how to modify the script correctly. The button is named 'submt' class='wp-button'.
____________________________________________
<script type="text/javascript">
function PopIt() {
$("a#trigger").trigger('click');
window.onbeforeunload = UnPopIt;
return "Would you like to join our mailing list for other offers?";
}
function UnPopIt() { /* nothing to return */ }
$(document).ready(function() {
window.onbeforeunload = PopIt;
$("a#trigger").fancybox({
'hideOnContentClick': false,
'showCloseButton': false
});
$("a[id!=trigger]").click(function(){ window.onbeforeunload =
UnPopIt; });
});
</script>
The Future of The Web