Problem with reset value from .html(output)
This event $('#sign').click(SignIn) show input forms in <div id="panel_left"> and when i try to click on input with id="loginuser" it should set value to "" but it's not working, any solutions?
- <script>
- $(document).ready(function(){
-
- $("#faq").change(onSelectChange);
- $("#LinkBox").focus(function() {
- $(this).attr("value","");
- });
-
- $('#sign').click(SignIn);
-
- $("#loginuser").focus(function() {
- $(this).attr("value","");
- });
-
-
- });
-
- function onSelectChange(){
- var selected = $("#faq option:selected");
- var output = "";
- if(selected.val() != 0){
- output = "Answer: " + selected.attr('name') ;
- }
- $("#answer").html(output);
- }
-
- function SignIn(){
- var output = "";
- output = '<input type="text" id="loginuser" size="8" maxlenght="8" value="Login" class="login"> <input type="password" id="password" size="8" maxlenght="8" value="Password" class="pass"><input type="submit" value="Sign In" class="send"/>';
- $("#panel_left").html(output);
- }
- </script>