sometimes, a class is not enough - you do need to use element storage
and be able to read data from a pre-processor / source. 

with the advent of html 5 and the data-blah="" provision, things are
getting a little easier in that regard, no more cluttering of rel, alt,
title and whatever made-up attributes that will cause problems with
validation.

unfortunately, not in mootools 1.2.3 - still can't use selectors that
work with this kind of element storage:

<div id="sidelinks">
<a href="#" id="foo" data-visited="1" rel="1">link 1</a><br />
<a href="#" id="foo2" data-visited="0" rel="0">link 2</a>
</div>
<script type="text/javascript">
    console.log($("sidelinks").getElements("a[data-visited=1]").get("id"));
    // outputs foo, foo2 - a change from 1.2 where this returned nothing
    console.log($("sidelinks").getElements("a[rel=1]").get("id"));
    // outputs foo only
</script>

you can use .filter() instead so it's not a big deal but still...

there was an old post here on this (selector problem using data-nnn structure) 
and
this was the response by Jan Kassens:

> This is fixed in the next selector engine, but we have to test it a  
> bit, so we weren't able to ship it with 1.2.1

We're now at 1.2.3 - still not working. Can anyone from dev team comment?

Cheers
-- 
Dimitar Christoff <[email protected]>

Reply via email to