Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to hide a div and disable the links inside?
    text
    copied!<p>I have a one <code>&lt;div&gt;</code> with links in it and another <code>&lt;div&gt;</code> below the first one.</p> <p>I want the first one to disappear, so that:</p> <ul> <li>the second <code>&lt;div&gt;</code> does not move. So the jQuery function <code>.hide()</code> is not what I look for.</li> <li>the links become inactive in the first div.</li> </ul> <p>Is it possible to do that, using javascript or jQuery ?</p> <p>PS : if it is not possible, I am interested of the other option where :</p> <ul> <li>the first <code>&lt;div&gt;</code> hides.</li> <li>the second <code>&lt;div&gt;</code> moves gradually.</li> </ul> <p>Thank you,</p> <p>Colas</p> <p>edit 2 :</p> <p>You can look at this fidle <a href="http://jsfiddle.net/XKMEp/5/" rel="nofollow">http://jsfiddle.net/XKMEp/5/</a> to see what I tried to do.</p> <p>edit : Here my attempts</p> <pre><code>$("#div1").click(function() { /*actus.fadeOut('slow');*/ actus.fadeTo(1000,0).delay(1001).style.visibility = 'hidden'; $('input,textarea,select,a', '#div1').attr("disabled", true); }); </code></pre> <p>even this does not work : </p> <pre><code>$("#div1").click(function() { /*actus.fadeOut('slow');*/ actus.fadeTo(1000,0).delay(1001).style.visibility = 'hidden'; $('input,textarea,select,a', '#div1').attr("disabled", true); }); </code></pre> <p>And let's say my html code is : </p> <pre><code>&lt;div class="container"&gt; &lt;div id="div1"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="container"&gt; &lt;div id="div2"&gt;&lt;/div&gt; &lt;/div&gt; .container{width:300px;height:300px;} </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload