4

I want to show popupPanel when i click on slideDown button ,but at the start my popupPanel is hidden

using

       popupPanel.getElement().setAttribute("style", "display:none");

but when i click on slideDown button it slide down very fast

& my onClick code is

 @Override
public void onClick(ClickEvent arg0) {

    if (arg0.getSource() == slideDown) {

            $(DOM.getElementById("popupPanel")).as(Effects).slideUp(Speed.SLOW);

     }

 }

Can u help me ?

Tushar Ahirrao
  • 12,669
  • 17
  • 64
  • 96
  • Have you been able to make this work please? I'm using animate($$("top: '-=50'"), 1000, Easing.SWING) but that's not exactly what I want. :( – Jaroslav Záruba Aug 10 '10 at 07:36
  • Ha, now looking about at this, and being more experience. I realize that there is no `public void` in JavaScript. Lol, this looks more like Java. – Shawn31313 Aug 02 '13 at 01:28

1 Answers1

2

This would work:

$('#popupPanel').css('display','none');
$('#ID_to_be_clicked').click(function(){    
    $('#popupPanel').slideToogle(3000); 
});

Their is not public nor void keyword in JavaScript. I think this is another case of JavaScript is Java...which it isn't.

Shawn31313
  • 5,978
  • 4
  • 38
  • 80