Hi, i have done a very simple example of jquery slide, but it doesn't
work correctly in internet explorer, it blinks in the beginning and at
the end. Thanks for all (sorry for my bad english).

link:
http://zital.no-ip.org/jquery/

html code:
<div id="container">
        <div id="top">
                adasd<br />
                adasd<br />

        </div>
        <div id="controls">
                <img id="close" src="img/fileclose.png"/>
                <img id="toggle" src="img/down.png"/>
        </div>
</div>
css code:

body
 {
         margin:0px;
         padding: 0px;
         background-color: #008000;
 }
 #top
  {
          width: auto;
          height: 50px;
          background-color: #ffff00;
          margin-left: auto;
          margin-right: auto;
          display: none;
  }
 #container
  {
          border: 1px solid black;
          width: 80%;
          margin-left: auto;
          margin-right: auto;
  }
 #controls
  {
        margin-left: auto;
        margin-rigth: auto;
  }
js code:
var http='http://zital.no-ip.org/jquery/';
$(document).ready(function (){
    $("#close").click(function(){
        $("#top").slideUp("slow", function(){
                $("#container").slideUp("slow");
        });
    });
    $("#toggle").click(function(){
    var img=document.getElementById('toggle');
        if(img.src==http+"img/down.png")
         {
          img.src="img/up.png";
          $("#top").slideDown("slow");
         }
        else
         {
         img.src="img/down.png";
         $("#top").slideUp("slow");
         }
    });
});

Reply via email to