multiple selectors within "getElements"

226 views
Skip to first unread message

blakerblaker

unread,
Jun 26, 2009, 10:47:27 AM6/26/09
to MooTools Users
Heya,

I'm curious on how I would call multiple selectors within a single
"get elements" tag. . . ?

For example, I want to both ".class1" and ".class2" within the
following function:

function createImage(link){
var currentImage = new Asset.images(link, {onProgress:
fadeInImage,onComplete: function(){initScrollbar($
(document.body).getElements('SLECTOR').length);window.addEvent
('resize',sizeScrollContent);Shadowbox.init();}});
}


theoretically it would look something like this that I can't get to
work:


function createImage(link){
var currentImage = new Asset.images(link, {onProgress:
fadeInImage,onComplete: function(){initScrollbar($
(document.body).getElements('.class1','class2').length);window.addEvent
('resize',sizeScrollContent);Shadowbox.init();}});
}


the full .js file can be seen at: http://thatbb.com/sara/src/site.js
with the class being called ".linkimg"......any help would be much
appreciated

nwhite

unread,
Jun 26, 2009, 10:50:36 AM6/26/09
to mootool...@googlegroups.com
$(document.body).getElements('.class1, .class2');

blakerblaker

unread,
Jun 26, 2009, 10:57:29 AM6/26/09
to MooTools Users
Oh yeah.. duh... thanks!

On Jun 26, 9:50 am, nwhite <changereal...@gmail.com> wrote:
> $(document.body).getElements('.class1, .class2');
>
Reply all
Reply to author
Forward
0 new messages