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

Inserting a JS plug-in

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 04-29-2016, 04:11 PM
 
cocopops cocopops is offline
 

Newbie
  
Join Date: Oct 2014
Posts: 7
 

Default Inserting a JS plug-in

I'm trying to install a simple CSS/JS accordion on one of my static pages but I keep getting stuck. The CSS seems to be loading as the accordion is styled, but when I click on the buttons to reveal the hidden text, nothing happens.

Here's what I've done...
1) Inserted this code in /customer/service_css.tpl
{load_defer file="lib/marco/accordion.css" type="css"}

2) Inserted this code in /customer/service_js.tpl
{load_defer file="/lib/marco/accordion.js" type="js"}

3) Uploaded CCS and JS files mentioned above:
http://s32.postimg.org/63znoxu51/image.jpg

4) Inserted the html in the content section of Static Pages:
http://s32.postimg.org/ttpn82yfp/image.jpg

Here is the link to the page: http://www.melissaphilippines.com/FAQ2.html?mode=preview

As you will see, the buttons are styled but nothing happens when you click them.
Here is a demo of how it is supposed to work: http://demo.stemkoski.com/accordion/

I've spent days trying to figure this out but can't seem to get anywhere!
Any help is much appreciated.
__________________
X-Cart v4.4.3 Gold
X-Cart Mobile
Reply With Quote
  #2  
Old 04-29-2016, 04:34 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Inserting a JS plug-in

Upgrade your jQuery to a version >= v1.7. You are currently using v1.5.2.

Edit skin/common_files/lib/jquery-min.js

Replace all the code with the code from here...

https://code.jquery.com/jquery-1.7.0.min.js

Then go to tools > maintenance > clear template cache

All versions are available here.
__________________
xcartmods.co.uk
Reply With Quote

The following user thanks PhilJ for this useful post:
qualiteam (05-01-2016)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:02 AM.

   

 
X-Cart forums © 2001-2020