Seems pretty simple but I can’t get it to work.
I have two divs with the class ‘user’. I want to output “you have 2 divs”.
<script type="text/javascript">
$(document).ready(function() {
function divcount() {
var mycount = $('.user').length();
document.write(mycount)
}
});
</script>
I’m sure I’m missing something simple..
Length is a property not a function. Size is a function.