X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Inserting a JS plug-in (https://forum.x-cart.com/showthread.php?t=73920)

cocopops 04-29-2016 04:11 PM

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.

PhilJ 04-29-2016 04:34 PM

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.


All times are GMT -8. The time now is 02:21 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.