-1

i need to change the class name at the run time for the particular div and this one is also supports for image preview using JQuery. . .

Dinesh Dinaz
  • 313
  • 1
  • 4
  • 13

2 Answers2

4

$("#YourDivID").attr('class', 'NewClassName');

Hammad
  • 140
  • 6
1

Try This One

 $('.button').click(function () {
     $("#Div").attr('class', 'CssName');
 });