How do i activate this jquery function when combined with PHP

p30lord.net

New Member
I would like to apologize at first instant for asking some stupid question(well not the case for me), but i cannot help it out. i must admit i do not know jQuery but i do have the basic understanding of Javascript and i am a dedicated PHP developer. i don't have any problem understanding the HTML or css. when it comes to jquery i lag it and i dont have enough time to learn it because of the deadline i have to meet. to start with i developed an application using php and purchased a template from themeforest, now it has some nice and beautiful javascript code the problem is i do not know how to make it work. even though it lies right infront of me. here is my code in the login page. where i want to use this jquery\[code\]<link rel="stylesheet" type="text/css" href="http://stackoverflow.com/questions/3639712/css/basicblack.css" title="styles5" media="screen" /><script type="text/javascript" src="http://stackoverflow.com/questions/3639712/js/jquery-1.3.2.min.js"></script><script type="text/javascript" src="http://stackoverflow.com/questions/3639712/js/supersleight.js"></script><script type="text/javascript" src="http://stackoverflow.com/questions/3639712/js/jquery.example.min.js"></script><script type="text/javascript" src="http://stackoverflow.com/questions/3639712/js/jquery.cookie.js"></script><script type="text/javascript" src="http://stackoverflow.com/questions/3639712/js/styleswitch.js"></script><script type="text/javascript">/* <![CDATA[ */ $(document).ready(function(){ $(".block").fadeIn(1000); $(".msg-error").fadeIn(1000); $(".msg-warning").fadeIn(1000); $('.msg-error').supersleight(); $('#username').example('Username'); $('#password').example('Password'); });/* ]]> */</script>\[/code\]and now i want to use the fadein effects for the class msg-error and msg-warning in my code, it is not working, here is the combined code with PHP logic which i have used. although with this i am able to get the desired result like it will show the error if the field is empty or invlalid username and password. but i am unable to use that fadein effect. how do i do that?\[code\]<div id="wrap"> <?php if(isset($_POST['login'])) { if( empty($_POST['username']) || empty($_POST['password'])) { ?> <div class="msg-error"> <img src="http://stackoverflow.com/questions/3639712/images/icons/22/messagebox_warning.png" alt=""/> <p>Please fill in all of the fields!</p> </div> <?php } }?> <?php if( isset($_POST['login'])) { if( !empty($_POST['username']) || $_POST['password']) { if( !check_login($_POST['username'], $_POST['password'])) { ?> <div class="msg-error"> <img src="http://stackoverflow.com/questions/3639712/images/icons/22/remove.png" alt=""/> <p>Wrong username or password!</p> </div> <?php } } } ?>\[/code\]
 
Back
Top