my style is here
#mybox{
display:none;
}
my web is here
<div id='mybox'>
...
</div>
<script type='text/javascript'>
$(document).ready(function(){
$("#mybox").css("display","visible");
})
</script>
mybox don't show. How to show mybox ?
Firstly, "visible" isn't a valid value for the display attribute. Something like "block" or "inline" is. Secondly, don't set CSS directly like this. It's problematic. Instead use the jQuery effects for showing and hiding things (show/hide/toggle, slideUp/slideDown, fadeIn/fadeOut, etc):
$(function() {
$("#mybox").show();
});
or alternatively use a class:
$(function() {
$("#mybox").toggleClass("visible");
});
with:
div.visible { display: block; }
hidden class with display: none; - this can be applied to anything. Also, I think the #mybox css rule is stronger, so I'm not sure adding a class will show it.