Thanks a lot @waseem, @Christiaan both ways works....
wow!! my code reduced to 50% coz i'm using only 3 lines instead 11 lines... $("#patientdvTop1").click( function() { $("#patientdvContent1").slideToggle("fast"); }); gr8 code!! thanks again. regards, Nitin Sawant On May 29, 1:32 pm, Christiaan Baartse <anotherh...@gmail.com> wrote: > Simple. > > You check if $("#patientopenCloseIdentifier1").is(":hidden") is true. > When you do this on a div wich is empty this always returns true. As > browsers hide empte nodes. > > Just try and add a space or a bit of text in <div > id="patientopenCloseIdentifier1"></div> and you'll see it works. > > On 29 mei, 07:19, Nitin Sawant <nitin.jays...@gmail.com> wrote: > > > > > Hello, > > I wrote following code for slide-up and slide-down animation of > > div tag, > > > javascript: > > > $("#patientdvTop1").click( function() { > > if ($("#patientopenCloseIdentifier1").is > > (":hidden")) { > > $("#patientdvContent1").slideDown > > ("fast"); > > $(this).css({'background-image' : 'url > > ("images/LeftBar/mainTopOver.png")'}); > > $("#patientopenCloseIdentifier1").show > > (); > > }else{ > > $("#patientopenCloseIdentifier1").hide > > (); > > $(this).css({'background-image' : 'url > > ("images/LeftBar/mainTopNormal.PNG")'}); > > $("#patientdvContent1").slideUp > > ("fast"); > > } > > > }); > > > html: > > <div id="patientopenCloseIdentifier1"></div> > > <div id="patientdvTop1"> > > <table width="100%" height="100%"> > > <tr> > > <td align="center"> > > <font face="trebuchet ms" > > color="darkblue"><b>Patient Registration</b></font> > > </td> > > </tr> > > </table> > > </div> > > <div id="patientdvContent1"> > > <center> > > <table cellpadding="8"> > > <tr> > > <td align="left"> > > Hello There > > </td> > > </tr> > > </table> > > </center> > > </div> > > <div id="patientdvBottom1"></div> > > > above code works fine in all versions of internet explorer, > > > but in Firefox,Google Chrome and Opera - just the Slidedown event > > occurs, slideup never happens pls help .. > > > regards, > > Nitin Sawant