18

Here is the page url http://meracd.com/design/disc_designer.php?disc=cd

I've used jqueryUI for the slider. But it isn't working. I've loaded jquery and jquery UI before the custom.js script.

enter image description here

Yahel
  • 37,023
  • 22
  • 103
  • 153
Bilbo Baggins
  • 3,644
  • 8
  • 40
  • 64

3 Answers3

36

You have multiple instances of jQuery on your page.

Your jQuery UI Slider Plugin is attaching to window.jQuery (which is version 1.6.2), but your custom.js code is trying to run against window.$ (which is version 1.6.4).

You need to either:

  • Get rid of one of them (there's no need to have both)
  • Alias the jQuery used in custom.js
  • Use noConflict() to resolve which jQuery gets access to the $ variable.
Yahel
  • 37,023
  • 22
  • 103
  • 153
  • 1
    I have removed the extra jquery and jquery ui scripts, now there's only a single reference to them. Still it in't working. – Bilbo Baggins Feb 24 '12 at 19:10
  • 3
    Because now the custom.js file starts with `jquery`, which should be `jQuery` (cap sensitive). – Yahel Feb 24 '12 at 21:44
  • :D thanks @yahelc your suggestion worked, I replaced all instances of $ with jQuery and its running beautifully. – Bilbo Baggins Feb 25 '12 at 10:59
5

You saved my day, in my case, adding noConflict() solved my problem

sample of my code

#

MVC 4

<script src="/Scripts/jquery-1.8.3.js"></script>
<script src="/Scripts/jquery-ui-1.9.2.js"></script>

jQuery.noConflict();
$(function(){
                 //  var $searchBox =  $("input#SearchString");
                   $("input#SearchString").autocomplete({
                       source: []
                   });
          });
0xFK
  • 2,433
  • 32
  • 24
  • 1
    Use `jQuery.noConflict();` before the start of your jQuery function to avoid conflicts with multiple (different) versions of jQuery files. – Faizan Jan 06 '13 at 09:51
  • I too had the same problem.It worked great for me.Thanks a lot for the answer.@Feras – sona May 14 '14 at 03:55
0

I just want to say that I had a similar issue and solved it by upgrading my version of JQuery. I had a really old version on the site and by updating to the latest one the issue was resolved.

rii
  • 1,578
  • 1
  • 17
  • 22