add id to script
- From: Andrew Clarke <clarke.andrew53@xxxxxxxxx>
- Date: Mon, 4 Jun 2012 16:55:10 -0700 (PDT)
I want to call UnPopIt when a user clicks on the button whose id is
'joinlist' but I can't figure out how to modify the script correctly.
____________________________________________
<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>
.
- Follow-Ups:
- Re: add id to script
- From: Holger Suhr
- Re: add id to script
- Prev by Date: FAQ Topic - How do I prompt a "Save As" dialog for an accepted mime type? (2012-06-05)
- Next by Date: Re: Defining a Prototype Inside a Constructor?
- Previous by thread: FAQ Topic - How do I prompt a "Save As" dialog for an accepted mime type? (2012-06-05)
- Next by thread: Re: add id to script
- Index(es):