Problem in the slideDown () function of the Gquery function

I want to show popupPanel when I press the slideDown button, but at the beginning my popupPanel is hidden

using

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

but when I click on the slideDown button, it weakens very quickly

& my onClick code

  @Override public void onClick(ClickEvent arg0) { if (arg0.getSource() == slideDown) { $(DOM.getElementById("popupPanel")).as(Effects).slideUp(Speed.SLOW); } } 

Can I help you?

+4
source share
1 answer

This will work:

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

In JavaScript, this is not the keyword public and void . I think this is another case of JavaScript is Java ... which is not the case.

+2
source

Source: https://habr.com/ru/post/1306342/


All Articles