Slick query

12 views
Skip to first unread message

hazlema

unread,
Feb 9, 2012, 11:03:09 PM2/9/12
to MooTools Users
Trying to figure out why my Slick query wont work:

This returns the info I want:
console.log($('game').getElements('div'));

This does not:
console.log($$('game ~~ div'));

How can I write a query to get all the div's after <div id="game">?

Sanford Whiteman

unread,
Feb 10, 2012, 12:03:33 AM2/10/12
to hazlema
> How can I write a query to get all the div's after <div id="game">?

$$('#game div')

$$('#game ~ div')

Depending on what you mean by "after".


Matthew Hazlett

unread,
Feb 10, 2012, 12:21:08 AM2/10/12
to MooTools Users

Thanks!
console.log($$('#game div')); did the trick.

I'm writing a silly game to get back into the swing of things, I haven't been coding anything for the better part of a year.

http://fiddle.jshell.net/hazlema/5LesN/


Thursday, February 09, 2012 11:03 PM

--

Matthew Hazlett Owner, Clarity Computers
Tel: 603 707 1774 | Mobile: 603 707 1774
haz...@gmail.com | http://www.linkedin.com/in/hazlema


Facebook Twitter LinkedIn
Reply all
Reply to author
Forward
0 new messages