登录 | 注册 | FAQ
Anonymous

Set a hide and open widget

+ 发表回复

3 篇帖子 分页: 1 / 1


Set a hide and open widget

ericwong99 » 周二 6月 17, 2014 3:15 pm

How to create a widget click open and click again for close
头像

ericwong99

  • 帖子: 3
  • 注册: 周六 2月 22, 2014 6:38 am

Re: Set a hide and open widget

nanoverso » 周三 6月 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.
头像

nanoverso

  • 帖子: 253
  • 注册: 周六 5月 10, 2014 12:08 am
  • 地址: Brazil
--
Free VST Plugins Download.

Re: Set a hide and open widget

XainPro » 周五 6月 20, 2014 7:09 am

its called jquery according check this simple example

http://jqueryui.com/accordion/
头像

XainPro

  • 帖子: 3933
  • 注册: 周五 2月 17, 2012 8:10 pm


+ 发表回复

分页: 1 / 1