Home > Web Front-end > JS Tutorial > body text

jQuery实现菜单式图片滑动切换_jquery

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

jQuery菜单式图片滑动切换是一款天猫官方网站的鼠标滑过图片切换导航菜单特效。

复制代码 代码如下:

$(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}//涓嶅鐞嗘弧瓒崇姸鎬佺殑
          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);
    })
})

演示图:

以上就是本文的全部内容了,希望大家能够喜欢。

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!