Somehow I keep getting undefined values out of my code. I probably missed something, but can't really figure out what.
Jade:
.orderform
a(class="nav-button closebutton black", id="order")
i(class="fa fa-times" aria-hidden="true")
form(method="post")
h1 Order Form
p [...]
.inputfield
input(type="text", name="fname", autofocus)
label First Name
.inputfield
input(type="text", name="fname")
label Last Name
.inputfield
input(type="email", name="email")
label Email
.inputfield
input(type="text", name="subject")
label Subject
.inputfield
textarea(type="email", name="email")
label Comment
input(type="submit", value="order")
I can add html code if needed
Javascript/Jquery:
function toggleOrder(){
$('a#order').click(function(){
$(".orderform").delay(200).toggle("slide", {
direction: "right",
duration: 1000,
easing: 'easeInOutQuint',
});
Code that puts out the undefined value:
$("form").children().each(function(){
alert(this.value);
//setTimeout(function(){
//$(this).eq(i).addClass('shown');
//}, 500 * (i+1) + 600);
});
});
}
So, when I press the dedicated button it alerts a undefined value. Did I miss something or do I need to rewrite the code?