I am using a textBox with the data-mini attribute set to true and a button to manipulate the input text box's attribute.
<input type="text" name="text1" Value="Enter name" id="txt1" data-mini="true" ></text>
<input type="button" value="Update Attribute" id="but1" onClick="$(this).UpAttr();"> </button>
Now What i want to change the data-mini to false on above button click. For this I have declared the method
$.fn.UpAttr=function()
{
$("#txt1").attr("data-mini","false");
$("#txt1").attr("value","New Value");
alert("The Button was clicked.");;
}
But data-mini attribute is not set to false although the value attribute is updated on button click. Can't find any solution for this !! Thanks..