I'm trying to make an input field disabled/enabled when I click on its sibling link.
Here is my code.
$('a').on('click',function(){
    var inp=$(this).siblings('input');
    inp.prop('disabled', false);
    $(this).click(function(){
        inp.prop('disabled', true);
    });
});
When I click first time it works fine, But from next time it won't work. Because the both click functions, triggers. I'm unable to overcome this issue. Please help me.
 
     
     
     
    