Login | Register | FAQ
Anonymous

Set a hide and open widget

+ Post a reply

3 posts Page 1 of 1


Set a hide and open widget

by ericwong99 » Tue Jun 17, 2014 3:15 pm

How to create a widget click open and click again for close
User avatar

ericwong99

  • Posts: 3
  • Joined: Sat Feb 22, 2014 6:38 am

Re: Set a hide and open widget

by nanoverso » Wed Jun 18, 2014 1:20 am

This kind of behavior can be achieved using JavaScript event onClick in combination with document.getElementById("elementToToogle") and changing its display or visibility property to a desired one. Example:
elementToToogle.style.display = "hidden"; .

You can see it working at http://www.w3schools.com/css/css_display_visibility.asp , where you can read more about differences between the two properties.
User avatar

nanoverso

  • Posts: 253
  • Joined: Sat May 10, 2014 12:08 am
  • Location: Brazil

Re: Set a hide and open widget

by XainPro » Fri Jun 20, 2014 7:09 am

its called jquery according check this simple example

http://jqueryui.com/accordion/
User avatar

XainPro

  • Posts: 3933
  • Joined: Fri Feb 17, 2012 8:10 pm


+ Post a reply

Page 1 of 1