开发者

Problem in slideDown() functtion of Gquery

开发者 https://www.devze.com 2022-12-26 06:39 出处:网络
I开发者_Go百科 want to show popupPanel when i click on slideDown button ,but at the start my popupPanel is hidden

I开发者_Go百科 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 ?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消