jquerygwtgquery

Problem in slideDown() functtion of Gquery


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 ?


Solution

  • 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.