1

I have coder slider on a page. It works fine on an *.aspx without a master page. However when I used it on an *.aspx page that used a masterpage, it didn't work. I solved it purely by chance when I found this;

http://wordpress.org/support/topic/manual-coda-slider-not-plugin-jquery-issueerrors

and changed $(document).ready(function () to $(document).ready(function ($). Does anyone know why this would make a difference between a page that doesn't use a masterpage and a page that does?

The console error was - Uncaught TypeError: Object [object Object] has no method 'codaSlider'

If anyone can enlighten me, I'd really appreciate it!

Edper
  • 9,144
  • 1
  • 27
  • 46
MountainBiker
  • 327
  • 5
  • 20

1 Answers1

2

Using .ready(function($){}) avoids conflict on the existing library that you might have in your system so the dollar sign (which is for jquery) is added rather than the simple function() without the parameter to avoid conflict. In your case it is most likely the WordPress Coda-Slider that conflicts with your jquery library.

See this link here which basically in the same line as your question and the Coda specific link here.

Community
  • 1
  • 1
Edper
  • 9,144
  • 1
  • 27
  • 46