Trying to count the number of input fields of class '.booked' that are NOT empty (ie they have some kind of value entered.
For some reason this is not doing it for me. Someone please put me out of my misery :)
$('input.booked:not(:empty)').length
Trying to count the number of input fields of class '.booked' that are NOT empty (ie they have some kind of value entered.
For some reason this is not doing it for me. Someone please put me out of my misery :)
$('input.booked:not(:empty)').length
the :empty selector filters to elements that have no child nodes. What you want is an attribute equals selector...
$("input.booked:not([value=''])").length