JQuery show and hide div on mouse click (animate)

后端 未结 6 1551
梦谈多话
梦谈多话 2020-12-01 04:04

This is my HTML code:

Click Here
6条回答
  •  离开以前
    2020-12-01 04:26

    Use slideToggle(500) function with a duration in milliseconds for getting a better effect.

    Sample Html

    
        
    2.

    How Can Aria Help Your Business

    At Aria solutions, we’ve taken the consultancy concept one step further by offering a full service management organization with expertise.

    3.

    How Can Aria Help Your Business

    At Aria solutions, we’ve taken the consultancy concept one step further by offering a full service management organization with expertise.

    In your js file, if you need child propagation for the animation then remove the second click event function and its codes.

    $(document).ready(function(){
        $(".js--growth-step").click(function(event){
           $(this).children(".step-details").slideToggle(500);
             return false;
        });
    //for stoping child to manipulate the animation
        $(".js--growth-step .step-details").click(function(event) {
            event.stopPropagation();
       });
    });
    

提交回复
热议问题