Hi,
I am getting some problem with Jquery slideToggle.The procedure is that in loginleftside.php when user
click on menu its display menu details. suppose if we hide the menu details and user click on contact us form
then how to check that this menu details was hide or show.
If we check the visiblity in contact us form. its always shows that its visible and also its display the
menu details,although user left the menu details hide last time.
Note that the loginleftside.php file is also again include in contact_us.php file.
Please help me I am stuck here.
loginleftside.php
<html>
<head>
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="js/jquerylogin.js" type="text/javascript"></script>
</head>
<body>
<div id="header">
<a href="#">Home</a> | <a href="contact_us.php">Contact us</a> |<a href="send_to_friend.php">Send to Friend</a>
</div>
<ul id="loginMainMenu">
<li><a><span class="menuColor">Menu</span></a>
<ul class="loginMenu">
<li><a href="edit_password.php">Change Password</a></li>
<li><a href="edit_registration.php">Edit Contact Info</a></li>
<li><a href="#">Pass Pappers</a></li>
<li><a href="contact_us.php">Contact us</a></li>
<li><a href="send_to_friend.php">Send to Friend</a></li>
</ul>
</li>
</ul>
</body>
</html>
Contact_us.php
<html>
<head>
<title>Todayera</title>
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function()
{
if ($("#loginMainMenu").is(":hidden"))
{alert("The Menu is hidden");}
else
{alert("The Menu is visible");}
});
</script>
</head>
<body >
<div id="wrap">
<div id="loginRightSide">
<?php include "loginleftside.php"; ?>
<div id="loginRightSide">
<form action="submit_contactus.php" method="post" id="contact_us">
<fieldset>
<ul>
<li class="contact"><span>Contact us</span></li>
<li><label>Your Email: </label>
<input type="text" name="email" class="email" id="email" />
</li>
<li><label>Subject: </label>
<input type="text" name="subject" id="subject">
</li>
</ul>
</fieldset>
<div id="submit_buttonn">
<input type="submit" name="submit" class="button" id="submit_btn" value=" Submit " />
<input type="reset" name="reset" class="reset" id="reset" value=" Reset " />
</div>
</form>
</div>
</div>
</body>
</html>
jquery.js
$(document).ready(function()
{
$("ul#loginMainMenu").click(function()
{
$("ul.loginMenu").slideToggle(2000);
});
});