pythonic pythonic - 2 months ago 6x
CSS Question

Is it possible to change the class name of a div element

I have something like shown below.

<div class="alert alert-info" style="width:224px">
<strong>Info!</strong> This is a netural alert

Through javascript or jquery, at certain condition, I want to change the class of that div element from
alert alert-info
alert alert-success
. Is that possible? And if so, how?


Change class with condition, Use the following sample

if(0==0)//your condition goes here