Custom slider with jQuery
I have the reproduce the next slider in jQuery. I can't change the design of the selector so I'm looking a way to reproduce it. The idea is to be a slideshow with auto-play and if you click on image of the selector you can change the page and the auto-play stops.
The idea of the code is also have a fallback in text for non-javascript browsers and for better indexing (the blue area is a image). My actual code is:
<div id="index-slider">
<div class="slides_container">
<div class="index-slider-case">
<div class="index-slider-fallback">
<h1>Lorem ipsum</h1>
<p>Proin at nibh ac diam eleifend mattis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In hac habitasse platea dictumst.</p>
<a href="/lorem-ipsum">Lorem ipsum</a>
</div>
<div class="index-slider-content">
<a href="/lorem-ipsum">
开发者_运维知识库 <img src="lorem-ipsum.jpg" />
</a>
</div>
</div>
</div>
</div>
And with jQuery:
$(function(){
$(".index-slider-fallback").remove(); // Remove the div's we don't need
$(".index-slider-content").removeClass("hidden"); // Activate the image div's
});
I didn't found a plugin to reproduce something similar so I'm thinking if I have to do something custom or there is anyway to modify a plugin. Can anyone help me?
Thank you in advance!
精彩评论