jquery - How to disable(inactive) a div using javascript? -


i new javascript, can 1 please me.

actually have div in html, disable div on page loading. code

<div class="col-1" id="plug_play_box" >     <div class="box first">         <div class="pad">             <div class="wrapper indent-bot">                 <strong class="numb img-indent2">01</strong>                 <div class="extra-wrap">                     <h3 class="color-1">                         <strong>plug </strong><label id="and">&</label> play                     </h3>                 </div>             </div>             <div class="wrapper">                 <a class="button img-indent-r" href="#" id="plug_play_button"></a>                 <div class="extra-wrap">                     point.co 1 of free website templates created templatemonster.com.                 </div>             </div>         </div>     </div> </div> 

thx in advance.

you can't disable div, inputs.

you can hide div however, using jquery done michelrobico suggested, if aren't using jquery :

document.getelementbyid(your_div_id).hidden = true; 

or use :

var divs_to_hide=document.getelementsbyclassname(your_div_class); (var i=0;i<divs_to_hide.length;i++) {     divs_to_hide[i].hidden=true; } 

and iterate through resultant array hide them individually. however, if you're new i'd stick using id's.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -