javascript - Moving divs over other divs with jquery -


i trying div move bottom of page without moving divs have under it. want move down without interrupting rest of page.

this jquery:

$(document).ready(function() {     $('#moveme').click( function() {          $('#moveme').animate({             margintop: "+=1000px"         }, 1500 );     }); }); 

this css:

#moveme {     height: 200px;     width: 200px;     margin: 10px, 30px;     background-color: blue;     text-align: center;     z-index: 1;     cursor: pointer; }  #nomove {     z-index: 2;     margin-top: 20px; }  header {     position: absolute; } 

this body of html:

<body>      <header>         <div id = "moveme">              <p> hello </p>         </div>          <div id = "nomove">             hi         </div>     </header>      <script src= "jquery.js" ></script>     <script src= "jquerypage.js" ></script>  </body 

try position: absolute; on #moveme element.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -