Remove a parent class from a child element before calling method on parent (javascript/jquery) -


say have following unordered list

<ul class="foo">   <li>     <div class="bar">     </div>     <div class="baz">     </div>   </li>  <li>    <div class="bar">    </div>    <div class="baz">    </div>   </li> </ul> <div class="nav">     <a class="prev-link">previous</a>     <a class="next-link">next</a> </div> 

i pass list carousel $(".foo").caroufredsel(//options) don't want class bar affected carousel.

i've tried $('.bar').removeclass('foo') before calling carousel, doesn't seem work... still part of carousel. how can prevent 1 div inheriting parent class or there different way can prevent div being treated part of carousel i.e. (just left in place)?

you try using !important css rule on .bar class properties don't want overwrite. that's not best use of rule.

you try :not() foo class selector.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -