jquery - OWL Carousel no function -


i want use owl carousel. have dreated test.php

where mistakes?

<script>  $('.owl-carousel').owlcarousel({     loop:true,     margin:10,     nav:true,     responsive:{         0:{             items:1         },         600:{             items:3         },         1000:{             items:5         }     } })  </script>  <div class="owl-carousel owl-theme">     <div class="item"><h4>1</h4></div>     <div class="item"><h4>2</h4></div>     <div class="item"><h4>3</h4></div>     <div class="item"><h4>4</h4></div>     <div class="item"><h4>5</h4></div>     <div class="item"><h4>6</h4></div>     <div class="item"><h4>7</h4></div>     <div class="item"><h4>8</h4></div>     <div class="item"><h4>9</h4></div>     <div class="item"><h4>10</h4></div>     <div class="item"><h4>11</h4></div>     <div class="item"><h4>12</h4></div> </div> 

i have add stylesheet links , jquery , .js directly source page! test.php not work! whats wrong?

what error getting?

without context, need make sure document in ready state before try access jquery. since script section comes before html, javascript execute before ".owl-carousel" exists. can achieve ready state wrapping code following event handler, or moving script section after html.

$( document ).ready(function() {    // code goes here }); 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -