Jump to content
php.lv forumi

jQuery: fadeIn nedarbojas


daGrevis

Recommended Posts

Sveiki,

Esmu iesācējs jQ. Nekādīgi netieku gudrs, kāpēc skriptiņš nedarbojas... =( Ceru uz palīdzību. =)

 

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="Text/HTML; Charset=UTF-8" />

	<title>Bliss</title>

	<script type="text/javascript" src="./javascripts/jquery-1.4.4.min.js"></script>

	<script type="text/javascript">
		<!--

			$(document).ready(function(){

				$("input#remember_me").click(function(event){

					$("p#shared_computer").fadeIn("slow");

				});

			});

		//-->
	</script>


	<link href="./themes/default/style.css" type="text/css" rel="stylesheet" media="all" />
</head>
<body>



<form method="post" action="do__sign-in.php">
	<p><label>Username: <input name="username" /></label> <strong>(*)</strong></p>

	<p><label>Password: <input name="password" type="password" /></label> <strong>(*)</strong></p>
	<p><label><input id="remember_me" name="remember_me" type="checkbox" /> Remember me!</label></p>
	<p id="shared_computer" class="small">[ Not recommended on a shared computer! ]</p>

	<p><input type="submit" value="Submit!" /></p>
</form>


</body>
</html>

Link to comment
Share on other sites

Ir kādas kļūdas, kas lec laukā javascript konsolē? Vajadzētu strādāt, imo..

 

Gribētu ieteikt šādu js kodu likt htmlam apakšā.

 

 

Pamēģini šo:

 

$(document).ready(function(){
alert('Mēs esam te');
$("input#remember_me").change(function(){
	alert('Tagad esam te');
	if($(this).is(":visible")){
		$("p#shared_computer").fadeOut("slow");
	}else{
		$("p#shared_computer").fadeIn("slow");
	}
});
});

Edited by briedis
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...