zoukankan      html  css  js  c++  java
  • jQuery 屏蔽鼠标快速经过

    <script type="text/javascript">
        $(".Banner ul li").bind('mouseover', function()
        {
            var cur = $(this).index();
            function action()
            {
                $(".Banner ol li").eq(cur).fadeIn(800);
                $(".Banner ol li").eq(cur).children("b").fadeIn(800);
            }
            handle = setTimeout(action, 500);
        }).bind('mouseout', function()
        {
            clearTimeout(handle)
        });
    </script>

    导航:

    var navFun = function() {
        var mouseover_tid = [];
        var mouseout_tid = [];
     
        $(".header .nav li").each(function(index) {
            $(this).hover(
            function() {
                var _self = this;
                clearTimeout(mouseout_tid[index]);
                mouseover_tid[index] = setTimeout(function() {
                    $(_self).addClass("hover").children().children("i, .nav-show").fadeIn(300);
                }, 200);
            },
            function() {
                var _self = this;
                clearTimeout(mouseover_tid[index]);
                mouseout_tid[index] = setTimeout(function() {
                    $(_self).removeClass("hover").children().children("i, .nav-show").fadeOut(300);
                }, 200);
            })
        })
    }

    navFun();

  • 相关阅读:
    HTML+CSS基础
    学习C++——实践者的方法(转整)
    招聘要求看技术发展
    笔记本自建无线wifi
    sortAlgorithms
    耐得住寂寞,拥得了繁华
    C++函数重载实现原理浅析
    程序员指南
    tf.image.non_max_suppression()
    函数 不定长参数
  • 原文地址:https://www.cnblogs.com/mixzo/p/4213500.html
Copyright © 2011-2022 走看看