I have a simple
jquery code that hides the div in Add to Cart Popup, which I can later manually show/hide:
In Head:
Code:
{literal}<script>
$(document).ready(function() {
$('#example').hide();
});
</script>{/literal}
In Add to Cart Popup (skin/common_files/modules/Add_to_cart_popup):
Code:
<a onclick="$('#example').show('fast')">Show</a><br />
<div id="example">This is an example of text that will be shown and hidden.<br />
<a onclick="$('#example').hide('fast')">Hide</a>
</div>
It doesn't work. My guess it has something to do with the way the popup is loading (most likely with ajax).
If I try to insert:
Code:
{literal}<script>
$(document).ready(function() {
$('#example').hide();
});
</script>{/literal}
directly in /common_files/modules/Add_to_cart_popup/product_added.tpl , it works, however it initiates some sort of second popup header overlay, witch I have to close first in order to get to main popup window:
http://compare-best-kettlebells-dvds.com/popup1.jpg
So my question is: How do I get my jquery code to work within Add to Cart Popup without triggering any additional popups?