javascript - Dynamically show text depending on form result -
i've got simple form, looks this:
team 1 <input type='button' value='-' class='qtyminus' field='quantity' /> <input type='text' name='quantity' value='0' class='qty' readonly /> <input type='button' value='+' class='qtyplus' field='quantity' /> team 2 <input type='button' value='-' class='qtyminus' field='quantity2' /> <input type='text' name='quantity2' value='0' class='qty' readonly /> <input type='button' value='+' class='qtyplus' field='quantity2' />
when 1 of teams has set number 3 want appear team's name dynamically below. "team1/team 2 winner!". , when change number next name of team, want text "team1/team2 winner!" disappear.
$('.qty').on('change', function(){ if($(this).val() == 3){ // } else { // other thing } })
Comments
Post a Comment