I am trying to find the way of binding event to an element. Can we bind a JQuery without mentioning function?
I need to make Loan binding enable on click so that it can calls same radio button.
It's getting unbind successfully but could not be rebind to call the same click method in which it is defined.
My code :
$('input[type="radio"]').click(function(){
var radioButId = $(this).attr('id');
var value = $(this).val();
alert(value + " is clicked");
if(value === "home")
{
alert("Enable Loan Link")
$( "#ba").bind( "click" );
}
if(value === "dog")
{
alert("Disable Loan Link");
$( "#ba").unbind( "click" );
}
});
Could someone please help.