jquery - CSS Display/Hide Methods -


i fixed issue still puzzled on why having trouble. when trying hide div tried use code:

<div id = mydiv></div>  function myfunction(){     $('#mydiv').css("display", "none"); } 

that code not work when trying hide div, will

  function myfunction(){     $('#mydiv').hide(); } 

i wanted know difference between each of these methods, , why 1 work while other did not.

this problem

<div id = mydiv></div> 

you have this

<div id="mydiv"></div> 

since both .hide() , .css() add "display: none" element, above code thing think of. use "" attributes.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -