2

I write a vertical tab in my store home page, and I should use jquery-1.10.2.min.js. but it has confilict with other scripts and somethings showing wrong in store.

DEMO of vertical tab.

How can I fix it?

Elham Gdz
  • 605
  • 3
  • 9
  • 20

1 Answers1

3

You can use noConflict

like

var $j = jQuery.noConflict();

Abdus Salam
  • 386
  • 2
  • 7
  • 22
  • 1
    Add this in script of vertical tab? – Elham Gdz Jul 05 '15 at 08:06
  • no problem. set top of script and all $ convert to $j (only this script) – Abdus Salam Jul 05 '15 at 08:41
  • It doesn't work!! – Elham Gdz Jul 05 '15 at 08:57
  • If you've done as Abdus said and made sure all jquery files use $j instead of $, then also make sure 1. there is only one instance of jquery on the page 2. noconflict comes right after jquery is called. Otherwise can you provide the error message you see in the console? – MW Millar Jul 05 '15 at 09:37
  • 1
    I found where is the problem, I add jquery-1.10.2.min.js and I have jquery-1.7.1.js in theme. I remove jquery-1.10.2.min.js and use what Abdus said and all things work good. – Elham Gdz Jul 05 '15 at 09:50