Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Using jquery within Add to Cart Popup

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-28-2013, 10:24 AM
  acidon's Avatar 
acidon acidon is offline
 

Senior Member
  
Join Date: Feb 2008
Posts: 139
 

Question Using jquery within Add to Cart Popup

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?
__________________
Version 4.7.6 X-cart Gold
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:11 AM.

   

 
X-Cart forums © 2001-2020