开发者

JQuery SHow Hide clarifcation please

I've a following div:

<div id="someDIV" style="display: none">
  bla开发者_开发技巧 bla bla
</div>

I've a jquery as below:

 $(document).ready(function () {
   if (condition==true)
   {
     $("#someDIV").show();
    }
 };

For some reason someDiv is not showing up if condition is true. Am I doing something weird here, please?

Thank you.


You are missing a closing paren: ). With it added before your last semicolon, your code works fine.

$(document).ready(function () {
   if (condition==true)
   {
     $("#someDIV").show();
    }
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜