Select from nested classes : Selector tag class « jQuery « JavaScript DHTML

Select from nested classes


    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
    $(".myClass.myOtherClass").css("border","1px solid red");


      <div class="notMe">div </div>
      <div class="myClass">div</div>
      <span class="myClass myOtherClass">span</span>



Related examples in the same category

1.Finds every DIV element.
2.Finds the element with the class "myClass".
3.Finds the elements that match any of these three selectors.
4.Get last paragraph and add class
5.Select tag by name
6.Select tag and its class
7.Select based one just added
8.Matches all elements with the given class
9.Query just added tags
10.Find the very next sibling of each paragraph that has a class "selected".