I’m not able to change the title attribute of div dynamically.
Here is my code :
EDIT:
<div id='DivId'></div>
this div is dialog div.
On click of button ‘First’ & ‘Second’, Dialog will open
// On click of button First:
$('#DivId').removeAttr('title');
$('#DivId').attr('title','first');
// On click of button Second:
$('#DivId').removeAttr('title');
$('#DivId').attr('title','second');
On the first button click, title remains that only, however, on clicking of second button, the title does not change.
EDIT
if I remove $('#DivId').removeAttr('title'); then also it is not working.
Dont know but
$('#Divid').attr('title', 'first');is not working for me…so I tried to remove$('#Divid').removeAttr('title');first , then apply new title. But did not worked. so I made 2 Div instead of one, and give title accordingly