How to make input+label in a form appear one by one?
Can someone help me with my example on How to make input+label in a form
appear one by one?
I have a with some inputs and labels and i want to make them appear one by
one. When the ENTER KEY will be pressed there the label #1 and the input
#1 must dissapear and second label + input must appear.
My script + css and jss is up on the jsfiddle http://jsfiddle.net/zApq4/
My js is:
$(document).ready(function() {
// First Show the First Element & Focus it
$("form.fieldContainer:first-child").fadeIn(500).focus();
// Setup a transition handler:
$("form.fieldContainer").keyup(function(ev) {
if $('#nextButton').click(show_next);
{
ev.preventDefault();
ev.stopPropagation();
var _next =
$(this).parents('form.fieldContainer').next('form.fieldContainer');
_next.fadeIn(500);
_next.find("input").focus();
}
});
});
I guess i'm doing something wrong in my js but i can't realise what.
Thanks to everyone
No comments:
Post a Comment