darsain / sly

JavaScript library for one-directional scrolling with item based navigation support.
http://darsa.in/sly
2.87k stars 497 forks source link

nodeType not defined #247

Closed stephwestgarth closed 8 years ago

stephwestgarth commented 8 years ago

Hi all,

I'm sure this is an issue just because it's a Friday afternoon, but someone may be able to point me in the right direction. I'm trying to put a slider in on my website and I'm getting this error when I'm trying to call init.

jquery.min.js:5 Uncaught TypeError: Cannot read property 'nodeType' of undefined

I'm using the example code from the docs and I still am having no luck. I've tried various objects and I get the same error every time. This error is thrown every time I attempt to use the init() function.

For reference:

// html 
<div class="frame" id="frame"><ul class="slidee"><li><p>Test Item</p></li></ul></div>

// javascript
var options = {
  horizontal: 1,
  itemNav: 'basic',
  speed: 300,
  mouseDragging: 1,
  touchDragging: 1
};

var frame = new Sly('#frame', options).init();