zoukankan      html  css  js  c++  java
  • jquery实现菜单的折叠并且变换图片

    jquery实现菜单的折叠并且变换图片


    $(function(){
        $("#p1").toggle(function(){
                $(this).prev().slideToggle(100,function(){
                    $("img","#p1").attr("src","images/up.gif");
                })
            },function(){
            $(this).prev().slideToggle(100,function(){
                    $("img","#p1").attr("src","images/down.gif");
                })
            })
            $("#p2").toggle(function(){
                $(this).prev().slideToggle(100,function(){
                    $("img","#p2").attr("src","images/up.gif");
                })
            },function(){
            $(this).prev().slideToggle(100,function(){
                    $("img","#p2").attr("src","images/down.gif");
                })
            })

    })

    箭头向下表示显示列表;

    箭头向上表示隐藏列表;


  • 相关阅读:
    PHP入门
    requests中text,content,json之间的区别
    有关pip报错的问题

    pycharm操作
    python selenium 相关操作
    python tkinter菜单
    初识Go
    Python _easygui详细版
    easygui _1
  • 原文地址:https://www.cnblogs.com/jiangu66/p/3006938.html
Copyright © 2011-2022 走看看