On some tutorials, I've seen these selectors:
$(':input');
or
$('input');
Note the ':'.
Are there any differences?
$('input')
= with only the element name, selects only HTML elements.
$(':input')
= with the colon, selects/filter all form input type elements, including input, select, textarea, and button elements.
Refer to the jQuery selector information:
http://api.jquery.com/category/selectors/
http://api.jquery.com/input-selector/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With