$('zoo').getParent().addClass('blog');
And here is the fiddle... JSfiddle
Question
Let's say we have this:
<article>
<div id="zoo">...</div>
</article>
I want to be able to add a class to <article>
using MooTools.
If I was using Jquery, I would use the following code:
$("div#zoo").parent().addClass("blog");
(http://jsfiddle.net/yannisdran/Eq2tY/)
resulting this in the DOM:
<article class="blog">
However, I need it in MooTools. How do I have to express this code?
Solution
$('zoo').getParent().addClass('blog');
And here is the fiddle... JSfiddle