jQuery menu-style image sliding switching is a special effect for the navigation menu of Tmall official website when the mouse slides over the image.
$(function(){
// floorCon-slide
$(".floorCon-slide .floorConSlideImgNav li span").css({opacity:0.95})
$(".floorCon-slide .floorConSlideImgNav li.hover").find("span").css({left:0})//鍒濆
$(".floorCon-slide .floorConSlideImgNav li").mouseover(function(){
If($(this).hasClass("hover")){return}//涓嶅鐞嗘ARCzan Chong姸镐人殑
var imgleft=$(this).index()*200*(-1) "px";
$(this).addClass("hover").find("span").stop().animate({left:0},400)
$(this).siblings().removeClass("hover").find("span").stop().animate({left:"-20px"},600)
$(this).parent().prev(".floorConSlideImg").stop().animate({left:imgleft},400);
})
})
Demo picture:
The above is the entire content of this article, I hope you all like it.