This is something I found out recently, and may be of interest to other developers.

Consider this HTML code:

<div id="mydiv">
     <div class="slab-wrapper">
         <div class="slab">


Consider this Mootools 1.24 javascript snippet:



Now you would expect <div class="slab"> to be selected, and you'd be right for Chrome, IE and other browsers, but Firefox throws a wrench in by apparently selecting the first element with a class with the word "slab" in it (in this case <div class="slab-wrapper">)

The workaround will be to use:



Good luck!

Sharing is Caring:

To avoid spam, please login to leave a comment.

Recommend this Article

Latest Comments

Get Onboard Our Mailing List!

Sign up for our mailing list to get the latest information in product releases, updates, and discounts. No spam, I promise! (cus I'm too lazy to send emails anyway)
Email address: