javascript - Hammer JS undefined -
i trying use yepnope
modernizr
, hammer.js
detect , trigger touch events slider. code. have 2 errors in console , don't manage debug. plus don't understand <
error comes from. if remove following bit of code, both errors disappear.
any clue?
var slider = $('#featured'); yepnope({ test: modernizr.touch, yep: [ "/assets/javascripts/jquery.hammer.js", "/assets/javascripts/hammer.js"], nope: [''], complete: function () { slider.hammer({drag: false}).bind("swipe", function (ev) { if(ev.direction === 'left'){ slider.trigger("orbit.next"); } else if(ev.direction === 'right'){ slider.trigger("orbit.prev"); } }); } });
i have following errors in console.
syntaxerror: unexpected token '<' typeerror: 'undefined' not function (evaluating 'slider.hammer({drag: false})')
check these 2 urls... "/assets/javascripts/jquery.hammer.js", "/assets/javascripts/hammer.js"
i'm guessing 1 of them returning html page, maybe error page.
also, press f12 open networking tab , check other .js files not loaded html.
Comments
Post a Comment