javascript - JQuery works in JSFiddle but not Live site -


Here is JSFiddle:

Here's the live site:

And yes, My index is properly linking to the JQuery library and my .js files Other javascript is working from all files, this is the only part I did in JSFDell which does not appear to be working. This is actually the opposite which is going to do it.

Here's a screenshot on the live site:

  var skincare = []; $ ('Skincare'). Click (function () {var value = event.target.className.split ("") [0]; var index = skinCare.indexOf (value); if ($ (this) .hasClass ('selected')) { // $ ('.skinCare'). RemoveClass ('selected'); skincare splice (index, 1);} and if ($ .rowre (value, skin care) == -1) {SkinCare.push (value );}}); $ ('Html') Click (function () {Alert (skincare);}); $ ('Circle'). Mouseover (function () {$ (this) .addClass ('hover');}); $ ('Circle'). Mouseout (function () {$ (this) .removeClass ('hover');}); $ ('.multi'). Click (function () {// $ (this} .css ('background-color', '# ff0000'); $ (this). Toggle class ('selected'); $ (this) .removeClass ('Hover ');});   

According to the Chrome Forum suggestion, I have tried to disable Chrome by phone extension, but there is no benefit. I get this error in the console :

  Uncheck error: syntax error, unrecognized expression: # jquery.min.js: 4st.error jquery.min.js: 4 ft jquery Min.js: 4th St. jquery.min. Js: 4bfn.anded.fandjquery.min.js: 4bf Nb.jquery.min.js: 3b jquery.min.js: 3 (oblivious function) jquery.scrollTo.js: 130b extension.each jquery.min.js: 3bfnb .e.jquery.min.js: 3 $ .fn.scrollTo jquery.scrollTo.js: 114 (anonymous function) myjs.js: 10b.event.dispatch jquery.min.js: 3 v.handle jquery. Min.js: 3 unwanted reference references: index myjs.js is not defined: 106 (anonymous function) myjs.js: 106 B.event.dispatch jquery.min.js: 3 v.handle    

To add to the position array is true, then press the value never in the array

< Code> if (index & gt; = 0) insted $ (this) .hasClass ('selected')

Add class about the time between the function and evaluate "hackwell" You should evaluate the function if Es is present on the array if the class is ...

  var skincare = []; $ ('Skincare'). Click (function () {var value = event.target.className.split ("") [0]; var index = skinCare.indexOf (value); if (index> = 0) {Skincare.plice (index , 1);} and if ($ .InArray (value, skin care) == -1) {skinCare.push (value);}});    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -