I have the following function that runs when the page is loaded, but I want it to only run when a button is clicked. How would I go about doing that?
And this is the anchor tag that I would want to trigger it:Code:<script> $(document).ready(function () { $.fancybox({ 'width': '80%', 'height': '80%', 'autoScale': false, 'transitionIn': 'fade', 'transitionOut': 'fade', 'type': 'iframe', 'scrolling' : 'no', 'href': 'cmetogo-offer.html' }); }); </script>
Any suggestions?HTML Code:<a href="index.html">Login Here</a>


Reply With Quote
Bookmarks