There are a couple of typos in that .css({ display:none; }) call: none needs
to be quoted, and the semicolon shouldn't be there.
 
Anyway, typos aside, it's not really a matter of being correct or not. Each
of the following sets the same CSS style:
 
$('#durl').hide();
 
$('#durl').css( 'display', 'none' );
 
$('#durl').css({ display: 'none' });
 
$('#durl')[0].style.display = 'none';
 
The .hide() method does a little extra work before setting the style, but
it's just bookkeeping stuff to help .hide() and .show() work together. The
net effect will be the same, setting the element's style.display attribute
to 'none'.
 
.hide() is certainly the easiest way to do it, though.
 
-Mike



  _____  

From: Kevin Pepperman

Giuliano showed you the correct way to hide the div.
 
But If you do want to add that css to the element it would be used like
this.
 
$(document).ready(function(){
    $("#durl").css({ display:none;  });
 });

Reply via email to