Elastislide jQuery Plugin Error

3.1k Views Asked by At

http://tympanus.net/codrops/2011/09/12/elastislide-responsive-carousel/


The plugin is not loading on my page at all, here's what I've done:

  • Uploaded all .js files to server and called in head section AFTER the jQuery lib

  • uploaded and linked all style sheets

  • inserted the html and ul containing the images into the appropriate body section

and am now attempting to call the plugin directly after the UL via:

<script type = 'text/javascript'>

     $('#carousel').elastislide();

      </script>

However I keep getting the following error from google JS Console:

Uncaught TypeError: Cannot call method 'prefixed' of undefined jquery.elastislide.js?2426:227

and when I expand the error it revelas the following:

$.Elastislide._init jquery.elastislide.js?2426:227

$.Elastislide jquery.elastislide.js?2426:186

(anonymous function) jquery.elastislide.js?2426:808

x.extend.each jquery.js:657

x.fn.x.each jquery.js:266

$.fn.elastislide jquery.elastislide.js?2426:799

(anonymous function)

As I mentioned, the plugin is not showing at all, nor is the raw unordered list containing the images. Any information or insight you can provide would be a huge help. I'm a jQuery noob but really need to get this working.

1

There are 1 best solutions below

0
On

Cannot call method 'prefixed' could be associated with Modernizr not yet being ready. This may suggest that you are calling elastislide before Modernizr.

Be sure that you are including the scripts in the correct order.

  • Modernizr
  • jQuery
  • elastislide
  • Then fire the function: $( '#carousel' ).elastislide();

Review the demo html files within the codrops download and follow the load order pattern they use.