Slideup, remove, add new div/content
Hi
So im trying to make my content slide up when im clicking on a button, then I want it to remove, add new content(div etc) and then slide down again, but it only slides up and adds the div.
My div is set top height:100px and it goes over my border?
Enter something in the input and then press generate and then the whole content slides up and something new adds and it slides down smoothly :)
- <div id="wrapper">
- <div id="top">
- <h1>League of Legends Riot Poins Generator</h1>
- </div>
- <div id="hidemid">
- <div id="mid">
- <img id="logo" src="http://i.imgur.com/Yg6xkxp.png">
- <form>
- <ul>
- <li><label>Enter Summoner Name</label></li>
- <li><input id="summonername" type="text"></li>
- </ul>
- </form>
- <hr>
- <p class="point">Select the amount of Riot Points to generate</p>
- <p class="point">Selected Riot Points: <input type="text" id="amount" disabled></label></p>
- <div id="slider"></div>
- </div>
- <div id="bot">
- <div id="generate"><p>Generate</p></div>
- </div>
- </div>
- </div>
-
-
-
- $('#generate').click(function(){
- $('#hidemid').slideUp();
- setTimeout(
- function()
- {
- $('#hidemid').remove();
- $('#top').append('<div id="mid2"></div>')
- $('#mid2').slideDown();
- }, 500);
- });