Sunday, November 22, 2009

Re: [jQuery] how to apply a class to a <div> using $('#id').html()

Hi.
how about this.

for example onclick event.

$('a').click(function(){
         $('#status').addClass('avail').html(' ... ');
});

Aom.

Tristan wrote:
Hello, i have in my script something like that  $('#status').html('<img src="images/accept.png" height="16" width="16"><font color="Green">' + email + '&nbsp;is OK</font>');  instead of that i want to apply on my div status the class called 'avail'  I know this is simple, but i'm stuck here.  Thanks for helping me.    

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate