开发者

Hide HTML code when using jquery

开发者 https://www.devze.com 2023-03-08 01:04 出处:网络
This sounds like a stupid question but i can\'t figure it out for the life of me. So say I am making a dialog box.

This sounds like a stupid question but i can't figure it out for the life of me.

So say I am making a dialog box.

<div id="dialog" title="mytitle" >blhablahablah
</div>

How do I stop that from showing up on the page. I开发者_如何转开发 only want to access it when it is in the dialog.


Add style="display:none;" to your <div> tag.

Another solution would be adding #dialog { display: none; } to your CSS.


If you want to do through jquery you can do this way

but whatever Thiefmaster mentioned is more effective..

$(document).ready(function() {
  $('#dialog').hide();
});


use isOpen function of ui-dialog and then if it is false hide the element

0

精彩评论

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

关注公众号