CSS and jQuery Image Slide Show on Mouseover

by muthu 2013-11-28 11:39:36

Css and jquery Image Slide Show on Mouseover

--------------------------------- DEMO ---------------------------------

image_hover.jpg

--------------------------------- HTML5 ---------------------------------

<ul class="thumb">
<li> <li> <li> <li> <li> </ul>

--------------------------------- CSS3 ---------------------------------

ul.thumb { float: left; list-style: none; margin:top; padding: 0px; width:700px; }
ul.thumb li { margin: top; padding: 5px; float: left; position: relative; width: 100px; height: 80px; }
ul.thumb li img { width: 100px; height: 100px; -ms-interpolation-mode: bicubic; border: 1px solid #ddd;
padding: 5px; background: #f0f0f0; position:absolute; left:0; top:0; }
ul.thumb li img.hover { background:url(thumb_bg.png) no-repeat center center; border: none; }

--------------------------------- JAVA SCRIPT ---------------------------------

<script type="text/javascript">
$(document).ready(function(){
$("ul.thumb li").hover(function() {
$(this).css({'z-index' : '10'});
$(this).find('img').addClass("hover").stop()
.animate({
marginTop: '-110px',
marginLeft: '-110px',
top: '50%',
left: '50%',
width: '174px',
height: '174px',
padding: '20px'
}, 200);
} , function() {
$(this).css({'z-index' : '0'});
$(this).find('img').removeClass("hover").stop()
.animate({
marginTop: '0',
marginLeft: '0',
top: '0',
left: '0',
width: '100px',
height: '100px',
padding: '5px'
}, 400);
});
});
</script>
542
like
0
dislike
0
mail
flag

You must LOGIN to add comments