html - jQuery Toggle - Sticky on Bottom - Reverse -


i trying make toggle function exact 1 :

http://gyazo.com/26fc509c540e5175c07593b57caef386 

but have troubles make reverse, contact box must showed down instead up, exact gif file

this have right :

http://codepen.io/anon/pen/gprvea 

can me please? thankyou

this html :

<div class="widget-style" id="widget"><a id="widget" hef="#"> click here more info</a></div>  <div class="contact-style" id ="contact" > contact <hr>   <p>more information in here</p> <p>and more information in here</p> <p>more information in here</p> <p>and more information in here</p> </div> 

this css:

.widget-style {    width: 300px;   height: 20px;   background-color:black;   color:white;   font-size:18px;   text-align: center;   vertical-align:bottom;   padding:14px;   margin-left:40%;   position:fixed;   bottom:0;   cursor:pointer; }  .contact-style {    width: 400px;   height: 230px;   background-color:white;   border:1px solid #000;   color:black;   font-size:18px;   text-align: left;   vertical-align:bottom;   padding:14px;   margin-left:37%;   position:fixed;   bottom:48px;   cursor:pointer; }  p {   font-size:14px; } 

and js:

$(document).ready(function(){   $("#contact").hide();    $( "#widget" ).click(function() {   $( "#contact" ).slidetoggle( "slow" ); });  }); 

this it: https://jsfiddle.net/qkk6a4tf/1/

html

<div id="fullwidget">     <div class="widget-style" id="widget"><a id="widget" hef="#"> click here more info</a>     <span class="arrowup">&#8593;</span>     <span class="arrowdown">&#8595;</span>      </div>     <div class="contact-style" id="contact">contact         <hr>         <p>more information in here</p>         <p>and more information in here</p>         <p>more information in here</p>         <p>and more information in here</p>     </div> </div> 

css

.widget-style {     width: 300px;     height: 20px;     background-color: black;     color: white;     font-size: 18px;     text-align: center;     vertical-align: bottom;     padding: 14px;     cursor: pointer;     border-radius: 0px;     z-index: 9; } .contact-style {     width: 298px;     height: 230px;     background-color: white;     border: 1px solid #000;     color: black;     font-size: 18px;     text-align: left;     padding: 14px;     cursor: pointer; } p {     font-size: 14px; } #fullwidget {     width: 300px;     height: 250px;     position: fixed;     left: 0px;     right: 0px;     bottom: -201px;     margin-left: auto;     margin-right: auto;     transition: 0.6s; } .widgetactive {     margin-bottom: 250px; } 

js

//&#8593; arrow //&#8595; down arrow $(".arrowdown").hide(); $(".arrowup").show(); $("#widget").click(function () {     $(".arrowup").toggle();     $(".arrowdown").toggle();     $("#fullwidget").toggleclass("widgetactive"); }); 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -