Home > Web Front-end > JS Tutorial > jQuery implements menu-style picture sliding switching_jquery

jQuery implements menu-style picture sliding switching_jquery

WBOY
Release: 2016-05-16 16:09:29
Original
1201 people have browsed it

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.

Copy code The code is as follows:

$(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.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template