jquery - sliding panel open/close on click -


how can have have sliding panel function "on click" instead of mouseover/mouseout

    <script>     $("button.main").mouseover(function() {         $("div.sliderinner").animate(                 {"width": "100px"},                 "500");     });      $("button.main").mouseout(function() {         $("div.sliderinner").animate(                 {"width": "0px"},                 "700");     });      $("button.main").mouseover(function() {        $("div.sliderinner")       .html('example content');     });      $("button.main").mouseout(function() {        $("div.sliderinner")       .html('');     });     </script> 

thank you

instead of mouseover .toggle , supply number of functions want toggle through including slideinner

 $(#buttonmain).toggle(function () {      $('div.sliderinner').animate(             {"width": "100px"},              "500");        }, function () {           //animate next click        }); 

the clicks cycle through functions


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -