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

Inserting a JS plug-in
   X-Cart forums > X-Cart 4 > Changing and adding new features
Thread Tools Search this Thread
Old 04-29-2016, 04:11 PM
cocopops cocopops is offline

Join Date: Oct 2014
Posts: 6

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:

4) Inserted the html in the content section of Static Pages:

Here is the link to the page:

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:

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
Old 04-29-2016, 04:34 PM
  PhilJ's Avatar 
PhilJ PhilJ is offline

Join Date: Nov 2002
Location: UK
Posts: 3,625

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...

Then go to tools > maintenance > clear template cache

All versions are available here.
Reply With Quote

The following user thanks PhilJ for this useful post:
qualiteam (05-01-2016)
   X-Cart forums > X-Cart 4 > Changing and adding new features

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 12:18 AM.


X-Cart forums © 2001-2018