user655334 user655334 - 1 year ago 80
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>

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


Answer Source

Like this:

$('.removeBackGround').parents('.fc-event-inner,.fc-event-skin').removeClass('fc-event-inner fc-event-skin');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download