Alternatively, if it is just about data-properties you can also just put this after mootools core and before your own code:
Selectors.RegExps.combined = (/\.([\w-]+)|\[([\w-]+)(?:([!*^$~|]?=) (["']?)([^\4]*?)\4)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g); However, I'd advice you to upgrade to 1.3. It is easy and painless and brings you a lot more new features. On Nov 21, 12:13 pm, Vic <[email protected]> wrote: > Thank you Oskar, I will look into both options. > > On Nov 21, 12:05 pm, Oskar Krawczyk <[email protected]> wrote: > > > > > > > > > Ah, I see, yes, you're right. > > > Well you've got two solutions here: > > > 1. Use Slick with 1.2.5 using @cpojer's solution > > -https://gist.github.com/361474 > > 2. Use 1.3-compat so your 1.2 scripts work AND you get all the new 1.3 > > awesomeness > > > Best, > > Oskar > > > On 2010-11-21, at 11:55, Vic wrote: > > > > I know, but that IS the problem, see this updated version: > > >http://jsfiddle.net/victor/AWfeD/1/ > > > > it should only target the last div, because both selectors target the > > > 'second' div > > > > On Nov 21, 11:01 am, Oskar Krawczyk <[email protected]> wrote: > > >> Works fine in 1.2.5 as well. > > > >> Your example adds colors to both divs, the top one and the bottom. > > > >> On 2010-11-21, at 10:55, Vic wrote: > > > >>> I now see that it does work correctly in MooTools 1.3, must have > > >>> something to do with slick? Still I would love to be able to do this > > >>> in my 1.2.4 code as well. This particular project cannot upgrade yet. > > > >>> On Nov 21, 10:37 am, Vic <[email protected]> wrote: > > >>>> Hi, > > > >>>> Is it correct that (MooTools 1.2.4/1.2.5) cannot succesfully select > > >>>> elements using css selectors by matching on custom data-* attributes? > > >>>> If I use the 'rel' or 'class' attribute the correct element gets > > >>>> selected, but I would like to be able to use the data-* attributes > > > >>>> View the example here: http://jsfiddle.net/AWfeD/ > > > >>>> any ideas? thank you
