The scriptaculous quiz has a demo version ( http://github.com/madrobby/scriptaculous/wikis/effect-slidedown ) that shows the effect of SlideDown. However, I need the same link to slide down if some DIV is hidden and SlideUp if this DIV is shown.
How do I achieve this?
Thank.
Use Effect.toggle .
Effect.toggle('element_id', 'slide');
Wrap it in a function, call the function.
function slideMe(myDiv) { if(Element.visible(myDiv)) { //slide up } else { //slide down } }
Source: https://habr.com/ru/post/1698883/More articles:Team City problem with uninstalled IE instance during batting test - internet-explorerASP.NET ASP.NET code for a page works, but impersonation is disabled - authenticationHow can I compile Firefox and enable multiple extensions? - firefoxHow to use JEDI TJCLHashMap classes? - hashmapOutput parameter not returned from stored Proc - c #The name of the template for a flexible data structure? - language-agnosticHow to set PostgreSQL table names in Rails with schema information? - ruby-on-railsSystem.IO.IOException: Символьная ссылка не может быть выполнена, поскольку ее тип отключен - c#Is there an ideal code generation tool for creating MVC Storefront? - asp.net-mvcColors CodeRush Xpress - visual-studioAll Articles