how to remove previous class and add new class in jquery?
asp.net, jquery, jquery-ui
Solution
Have you looked at removeClass
i.e
$("#hiddenTag").removeClass('someclass').addClass(elementID);
And if you don't know the class name:
$("#hiddenTag").removeAttr('class').addClass(elementID);
Problem
I am storing my primary key as Classname everytime this function called i will have new primary key key, ``` function OnBtnShowPopupClick(elementID) { ASPxClientPopupControl1.ShowAtElementByID(elementID); $("#hiddenTag").addClass(elementID); } ``` what i want is to remove previous classname and add new className how?