[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Spilfiduser
jQuery Tutorial – 61 – each
by
Tags:
Comments
16 responses to “jQuery Tutorial – 61 – each”
-
thanks Dear… You are awsomeee
-
Use (':text') instead of $('input[type="text"]').each function …
DO NOT FORGET DOTS IN (':text')
here is my code:
jQuery(document).ready(function(){
jQuery('#Combine').click(function(){
var failed = false;
jQuery(':text').each(function() {
if(jQuery(this).val() == "") {
failed = true;
}
});
if (failed == true) {
alert('Fill out all fields');
} else {
alert('Thanks for filling out all fields');
}
});
}); -
gr8
-
what does it means , you put a $ sign before failed variable
-
then if you fill the first, leave empty the second, and fill the third the failed variable will be false right.? because in the second it changed into true then when the third is checked and its empty the failed variable is now false. validation will have some errors ..
-
awesome tutorial
-
At the moment, this seems so pointless O.o
-
@ alex or anyone here, why is each a statement or a function and not a method ? are attribute selectors compatible with older browsers esp. ie ?
-
.text will only output text. .html will output html.
-
hahahaha thats hella funny
-
good job
-
nice
-
$failed, php style 😀
-
Great tutorials. Keep them coming.
I didn't think I'd really enjoy these, but they are very interesting. -
deserves more
-
16 views lawl
Leave a Reply