From jQuery JavaScript Library
« Back to Plugins/Validation
:filled
Matches elements with a value.
filled means any value, but not only whitespace.
The implementation does a check like this: jQuery.trim(value).length > 0
Examples:| Name | Type |
Finds input elements with a non-whitespace value.
$("input:filled").css("background-color", "#bbbbff");
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script>
<script>
$(document).ready(function(){
$("input:filled").css("background-color", "#bbbbff");
});
</script>
</head>
<body>
<div>Mouseover to see the value of each input</div><input value="" title='""'/><input value=" " title='" "'/><input value="abc" title='"abc"'/>
</body>
</html>