Reputation: 97
I´ve read and follow the unslider documentation from here http://unslider.com/, but nothing appears in my page. Is something missing?
html
<div class="banner">
<ul>
<li>This is a slide.</li>
<li><img src="imagens/banner2 2.jpg" /></li>
<li>This is a final slide.</li>
</ul>
</div>
Javascript:
<script type="text/javascript" src="unslider/unslider.min.js"> </script>
<script type='text/javascript' src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
$(function() {
$('.banner').unslider();
});
</script>
CSS:
.banner { position: relative; overflow: auto; }
.banner li { list-style: none; }
.banner ul li { float: left; min-height:100px;}
Upvotes: 0
Views: 279
Reputation: 1075
Unslider is a jQuery plugin, so you'd have to include jQuery before you include the Unslider code, not the other way around. E.g.:
<script type='text/javascript' src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="unslider/unslider.min.js"></script>
<script type="text/javascript">
$(function() {
$('.banner').unslider();
});
</script>
Upvotes: 1