javascript - jQuery slick (carousel) plugin not working -
i'm trying utilize jquery plugin ( http://kenwheeler.github.io/slick/ ) carousel. tried many different plugins, face kind of error. so, i'm sticking until figure out whats wrong.
here html head:
<head> <!--[if lt ie 9]> <script src='http://html5shiv.googlecode.com/svn/trunk/html5.js'></script> <![endif]--> <meta charset='utf-8' /> <meta name='viewport' content='width=device-width, initial-scale=1.0'> <meta http-equiv='x-ua-compatible' content='ie=edge'> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <link rel="stylesheet" type="text/css" href="slick/slick. <script type=" text/javascript " src="slick/slick.min.js "></script> <script type="text/javascript " src='/js/carousel.js'></script> </head>
when tried it, got 'uncaught typeerror: undefined not function' @ line of js phone call function 'slick'. here phone call it:
<div class="slider single-items"><div></div><div></div><div></div></div>
and here carousel.js:
$(document).ready(function () { $('.single-item').slick({ dots: true, infinite: true, speed: 300, slidestoshow: 1, slidestoscroll: 1, autoplay: true }); });
you selecting $('.single-item')
, markup has elements class single-items
(with "s" @ end). assuming pasted code correct, jquery should changed $('.single-items')
.
$(document).ready(function () { $('.single-items').slick({ dots: true, infinite: true, speed: 300, slidestoshow: 1, slidestoscroll: 1, autoplay: true }); });
jsfiddle: http://jsfiddle.net/n6wfg/
javascript jquery jquery-plugins
No comments:
Post a Comment