I have incorporated jCarouselLite with my already working site, however the PREV and NEXT buttons appear, but no IMAGES. The image links are correct.
Any ideas?
jQUERY:
<script type="text/javascript">
//jCarouselLite
$(function() {
$(".slider").jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
visible: 4
});
});
</script>
HTML:
<div id="list">
<div class="prev"><img src="images/prev.jpg" alt="prev" 开发者_运维知识库/></div>
<div class="slider">
<ul>
<li><a href="#" title="Title 1"><img src="images/store_item_img.jpg" alt="Image 1" class="captify" /></a></li>
<li><a href="#" title="Title 2"><img src="images/store_item_img.jpg" alt="Image 2" class="captify" /></a></li>
<li><a href="#" title="Title 3"><img src="images/store_item_img.jpg" alt="Image 3" class="captify" /></a></li>
<li><a href="#" title="Title 4"><img src="images/store_item_img.jpg" alt="Image 4" class="captify" /></a></li>
<li><a href="#" title="Title 5"><img src="images/store_item_img.jpg" alt="Image 5" class="captify" /></a></li>
<li><a href="#" title="Title 6"><img src="images/store_item_img.jpg" alt="Image 6" class="captify" /></a></li>
<li><a href="#" title="Title 7"><img src="images/store_item_img.jpg" alt="Image 7" class="captify" /></a></li>
<li><a href="#" title="Title 8"><img src="images/store_item_img.jpg" alt="Image 8" class="captify" /></a></li>
</ul>
</div>
<div class="next"><img src="images/next.jpg" alt="next" /></div>
</div>
CSS:
.slider {
background-color:#3399FF;
float:left;
margin:15px;
position:relative;
visibility:hidden;
}
.slider ul {
height:180px;
width:840px;
}
.slider ul li {
padding:0 20px;
}
.slider ul li img {
cursor:pointer;
height:150px;
padding-top:3px;
width:180px;
}
.prev {
cursor:pointer;
float:left;
padding-top:90px;
}
.next {
cursor:pointer;
float:right;
padding-top:90px;
}
SCRIPT:
<script type="text/javascript" src="http://www.theratio.net/js/jquery.js"></script>
<script type="text/javascript" src="js/jcarousellite_1.0.1.pack.js"></script>
<script type="text/javascript" src="js/captify.tiny.js"></script>
Please Help?
:)
UPDATE:
If I remove
$("#store_container").hide();
..and make it look like this, it works, however the div is opened first instead of closed.
<script type="text/javascript">
$(function(){
$('#toggle').toggle(function(){
$('#store_container').slideDown("slow", function() { $('#store_data').fadeIn(); });
}, function() {
$('#store_data').fadeOut("fast", function() { $('#store_container').slideUp("slow"); });
});
});
</script>
How can I made #store_container be closed with using .hide ? Or is there a way to show it after the function is clicked?
I don't know anything about jCarouselLite, but in your style, your .slider is set to visibility:hidden;
and I don't see anything in your code that makes it visible.
EDIT:
Don't forget:
$('document').ready(function(){
// my jquery javascript code
})
Are you sure you've included the jQuery and jCarouselLite scripts properly? Does Firebug show the scripts? Any errors?
did you get this figured out? The images need their height and width attributes.
精彩评论