DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Not Sliding Jquery

05.19.2009
| 2284 views |
  • submit to reddit
        // This is the ExpressionEngine code - wondering why this deosn't slide. It just appears and also flickers (FF only) before appearing.

  <div id="login_wrap">                 

  {if logged_out}<span class="login_button"style="display: visible;"><a href="#">login</a></span> | <a href="{path=member/register}">Register</a> {/if}{if logged_in} <a href="{path=forums/member/profile}">profile</a> | <a href="{path=LOGOUT}">Logout</a>{/if}
	
	<div id="login_form">                
		<div id="login_contents"> </div>
		{exp:member:login_form return="site/index"}
			<label>Username</label>
			<input type="text" name="username" value="" maxlength="32" class="input" size="25" /><br />
			<label>Password</label>
			<input type="password" name="password" value="" maxlength="32" class="input" size="25" /><br />
			<input type="submit" name="submit" value="Submit" />
		{/exp:member:login_form}
	</div><!--login_form-->

  </div><!--login_wrap-->


// This is the jquery

<script type="text/javascript">
1
2 $(document).ready(function() {
3 $('div#login_form').hide();
4
5 $("span.login_button").click(function(){$("div#login_form").slideToggle({})
6 });
7
8});
9
</script>