user655334 user655334 - 3 months ago 9
CSS Question

jQuery Removing class for parent div

I have structure in the following way:

<div class="fc-event-inner fc-event-skin">
<span class="fc-event-title">
<div class="removeBackGround"></div>
</span>
</div>


so, using jquery how do i find and remove the parent class(fc-event-inner fc-event-skin) using "removeBackGround" class.

Thanks
vishnu

Answer

Like this:

$('.removeBackGround').parents('.fc-event-inner,.fc-event-skin').removeClass('fc-event-inner fc-event-skin');
Comments