How do I remove a css class from a div tag and then add another css class to that same div tag using JQuery?
|
|
|
|
|
Question: How do I remove a css class from a div tag and then add another css class to that same div tag using JQuery? Answer: The following code removes a css class and then adds another css class to a specific div tag $('#div_id').removeClass("OldClass").addClass("NewClass"); #div_id = Div Tags ID OldClass = CSS class that needs to be removed NewClass = CSS class that needs to be added
|