![]() |
How Do I Use a Button to Trigger JavaScript? Hey guys, I am using an OptimizePress "Add to Cart" button. I want it to trigger this javascript code: <a href="http://gum.co/sogr">The Science of Getting Ripped_draft</a><script type="text/javascript" src="https://gumroad.com/js/gumroad.js"></script> When I add that to my page, I see the vendor provided "add to cart" button, but I want that code to trigger my OptimizePress "Add to Cart" button. If you go to www.TheScienceofGettingRipped.com/guide you'll see what I mean. Currently, if you click the "Add to Cart" button, it redirects you to another site. However, if you click the vendor provided button, it triggers the javascript overlay. How can I use my button with their javascript overlay? Thanks in advance! Raza |
Re: How Do I Use a Button to Trigger JavaScript? I'm not real clear on exactly what you're trying to accomplish here, but if you simply want a button click to trigger an external Javascript file, then you can do this (jQuery)... Code: <script type="text/javascript"> |
| All times are GMT -6. The time now is 08:13 AM. |