jquery - My slide-out tab only works half of the time, why? -


(update. solution: if don't use external css , style inside html document seems work. strange work now, never encountered before , if can explain why happens awesome )

i'm going crazy on here, slide-out tab i'm using works expected. reload page , jumps out bit side revealing bits of what's inside tab. reload again , not. reload again , problem back...

this code:

css:

.slide-out-div {     padding: 1px;     width: 243px;     height: 210px;     background: white;     border: 1px solid #29216d; } .handle {     background: url(bilder/contact_tab.gif);     height:174px;     width:30px; } 

and jquery:

$(function () {     $('.slide-out-div').tabslideout({         tabhandle: '.handle', //class of element become tab         pathtotabimage: 'null', //path image tab //optionally can set using css         imageheight: 'null', //height of tab image //optionally can set using css         imagewidth: 'null', //width of tab image //optionally can set using css         tablocation: 'left', //side of screen tab lives, top, right, bottom, or left         speed: 200, //speed of animation         action: 'click', //options: 'click' or 'hover', action trigger animation         toppos: '90px', //position top/ use if tablocation left or right         leftpos: '20px', //position left/ use if tablocation bottom or top         fixedposition: false //options: true makes stick(fixed position) on scroll     }); }); 

and html:

<div class="slide-out-div">     <a class="handle1" href="http://link-for-non-js-users.html">contact/booking</a>      <img src="bilder/contact_tab.gif" class="handle" />     <div id="contact-area">         <form action="mail.php" method="post">             <p>name</p>             <input type="text" name="name" id="name" />             <p>email</p>             <input type="text" name="email" id="email" />             <p>message</p>             <textarea name="message" rows="6" cols="25" id="message"></textarea>             <br />             <input type="submit" value="send" class="submit-button" />         </form>     </div> </div> 

http://jsfiddle.net/isherwood/g9qkw/1


Comments