Quick Mootools Question

Since old IE browsers and old safari doesn’t support the CSS pseudo class :last-child, I want to add a class “last-child” via mootools.

example:
HTML:
<div id=”top”>
<div>First</div>
<div>Second</div>
<div>Last</div>
</div>

CSS:
.lastchild {float:right;}

QUESTION:
What would be the proper syntax to add the class “lastchild” to the last div inside the #top using Mootools?

Leave a Reply

Your email address will not be published. Required fields are marked *