Simple question: How to change div title using jquery

Posted by user281180 on Stack Overflow See other posts from Stack Overflow or by user281180
Published on 2010-04-23T06:37:12Z Indexed on 2010/04/23 6:43 UTC
Read the original article Hit count: 228

Filed under:

I have the following code:

<div id="DivPassword" title="test" > 

I want to change the div title and I have the following code:

 function ChangeAttribute() {
         $("#DivPassword")
            .attr('title', 'Photo by Kelly Clark');
         $('#DivPassword').dialog('open');
         return false;
     }

When the dialog is opened, the title is still test! if I dont assign any title to the div, the dialog doesnt show any title. How can I correct that?

© Stack Overflow or respective owner

Related posts about jQuery