jQuery to enable and disable textbox with button on click -
when click button first time, textbox1 enabled, textbox2 , textbox3 disabled, when click button second time, textbox2 enabled , textbox11 & textbox3 disabled, , lastly when click button third time, textbox3 enabled , textbox1 , textbox2 disabled. please me.. thank
i have tried this, need jquery script of body:
<input type="text" name="text1" id="txt"> <input type="text" name="text2" id="txt2"> <input type="text" name="text3" id="txt3"> <input type="button" value="edit" name="button1" id="btn">
say bellow
var count = 0; $('#btn').click(function(){ count = count%3; $('input[type="text"').attr('disabled',true).eq(count++).attr('disabled',false); }) on fourth click again enable first input.
Comments
Post a Comment