Trying to check all text boxes on blur event that are a child
Hi I am trying to select all text boxes that are a child of form with a certain class. I can't get it to fire is this how
I should do the selection?
I am then checking multiple textboxes contain text then enable or disable a text box
- $(".cdform > text").blur(function()
- { if ($('#signup-Mobile').val().length === 0 && $('#signup-firstname').val().length === 0 && $('#signup-firstname').val().length === 0 && $('#signup-Address1').val().length === 0 && $('#signup-City').val().length === 0 && $('#signup-PostCode').val().length === 0 && $('#signup-Email').val().length === 0) { $('#AddData').addAttr('disabled'); } if ($('#signup-Mobile').val().length !== 0 && $('#signup-firstname').val().length !== 0 && $('#signup-firstname').val().length !== 0 && $('#signup-Address1').val().length !== 0 && $('#signup-City').val().length !== 0 && $('#signup-PostCode').val().length !== 0 && $('#signup-Email').val().length === 0) { $('#AddData').removeAttr('disabled'); }
- });