3

It seems I have a problem with JQuery Lite Content Slider. I get a warning when ever I try to move to the next slide. I'm not completely convinced that this is the problem because it's only a warning, but I can't see any other problems with the script.

The website is skincarewithaconscience.com

Any help or suggestions would be greatly appreciated.

UPDATE

I'm using jQuery 1.7.1 and noConflict mode is used in the Lite Content Slider. Sorry I should have mentioned both those points.

Chris Nicol
  • 10,256
  • 7
  • 39
  • 49

3 Answers3

6

The use of jQuery.noConflict(); removes the association of jQuery to the $ variable which is often required when using either more than one version of jQuery on the same page, or when using jQuery at the same time as using another framework that also uses $ as a reference to their framework.

As your site uses jQuery.noConflict();, you need to either refer to jQuery by name instead of using the $ shortcut, or to wrap your functions in a closure that rename jQuery to $ (in the same way as the livequery or prettyPhoto plugins do).

To create a closure you would use:

(function($) {
  // your code using $ goes here
  $(document).ready(function() { /* etc */ });
}(jQuery));
steveukx
  • 4,370
  • 19
  • 27
5

This issue is fixed in jQuery 1.7.

WebKit issues with event.layerX and event.layerY

The site is currently using version 1.6. Can you upgrade?

Community
  • 1
  • 1
Trent
  • 1,280
  • 11
  • 12
  • Are you sure the site is using 1.6, I've looked at my jQuery within the content folder and it's marked as 1.7.1. Is there something I'm missing? – Chris Nicol Apr 09 '12 at 04:36
  • 1
    I'm using the chrome developer tools. The first script is jquery.min.js?ver=1.6.0. I don't see a 1.7 script. Where do you see that? – Trent Apr 09 '12 at 12:42
  • I see that in my include folder in the wordpress source on my server. I'll take a look for the .min.js. I'm only seeing jquery.js which is 1.7.1 – Chris Nicol Apr 09 '12 at 16:23
  • 1
    It looks like it's referencing jQuery on the Google CDN. It's not referencing the local copy... – Trent Apr 09 '12 at 17:20
  • Chris - did you ever figure this out? – Trent Apr 11 '12 at 19:15
  • Hi Trent, I did and it was due to the use of $() in the header.php. Thanks for all your help though. – Chris Nicol Apr 12 '12 at 04:43
1

What I found is that $ is not available to the browser.....but in settings.js $ is used everywhere.

Yes...as you mentioned that you are using it in noConflict mode

Wrap it in the jQuery namespace like in jquery.prettyPhoto.js

That should fix this thing.....

Sandeep Rajoria
  • 1,243
  • 8
  • 14