Hide HTML code when using jquery
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
精彩评论