Advertisement
mOrloff

Trying multi selectors

Aug 16th, 2011
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.     function findMatches(){
  3.         console.log($(".a",".b",".c"));  // for testing
  4.     }
  5. </script>
  6.  
  7. <div id="red-text" onClick="findMatches()" style="color:red;">
  8.     <p>Click here and check the Console Log</p>
  9. </div>
  10. <div class="a">
  11.     <p>Class A</p>
  12. </div>
  13. <div class="a b">
  14.     <p>Class A B</p>
  15. </div>
  16. <div class="a b c">
  17.     <p>Class A B C</p>
  18. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement