Hmm,
there is an easier than this.

$("#patientdvTop1").click( function() {
  $("#patientdvContent1").slideToggle("fast");
});

On Fri, May 29, 2009 at 7:19 AM, 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
>

Reply via email to