Skip to content

24 ways to impress your friends

Vote up?

Michael Hamilton (M2tM)

I’ve put together a quick mootools version of this: http://www.m2tm.net/Programming/mooSuperSleight.js

In use examples:
//This will apply it to every element on the page. This is the same as passing in {‘selectors’:[’*’]}
<script type = “text/javascript”>
new MooSuperSleight();
</script>

//This will apply it to all elements with a class Alpha
<script type = “text/javascript”>
new MooSuperSleight({‘selectors’:[’.Alpha’]});
</script>

//This will apply it to most elements people style with pngs and specify a non-default shim (default is just blank.gif in the root folder.)
<script type = “text/javascript”>
new MooSuperSleight({‘selectors’:[‘img’, ‘div’, ‘input’, ‘section’, ‘article’, ‘aside’, ‘header’, ‘footer’, ‘ul’, ‘li’, ‘h1’, ‘h2’, ‘h3’, ‘h4’, ‘h5’, ‘h6’, ‘h7’], ‘shim’:‘images/blank.gif’});
</script>