Mais um Expand/Colapse HTML Panel utilizando o Prototype e Script.aculo.us

by brunofig 4. August 2006 08:13
Á falta deste tipo de objectos, decidi adicionar mais um a vasta lista que se encontra na net. O código é bastante simples:

A função Build faz o seguinte:

  1. ···Cria um array com todos os elementos que tenham declarado a cssClass ".panelContent".
  2. ···De seguinda navega por todos os elementos que declarem a cssClass ".panelHeader"
  3. e criar um event handler para o click para cada elemento.
  4. O evento click faz mostrar ou esconder o conteúdo de cada painel.

 

A estrutura HTML do painel é bastante linear:

Para fazer download do código clique aqui.

Para visualizar em exemplo, clique aqui.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.7
Theme by Mads Kristensen

About the author

Hi!

My name is Bruno and I'am a senior consultant. When I'm not working, you can catch me playing with my daugther, taking photos and hanging out with my wife and friends. :)

You can also check my dark side or have fun with my vision of the world.

View Bruno Figueiredo's profile on LinkedIn

TwitterCounter for @brunoshine
 
Creative Commons License

 
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
 

Ads

    Page List

      Most comments

      Busby SEO Test Busby SEO Test
      2 comments
      kh Cambodia
      laptop cases laptop cases
      2 comments
      Busby SEO Test Busby SEO Test
      1 comments

      RecentComments

      Comment RSS

      Popuri.us

      My Popularity (by popuri.us)