Fluid slideshow widths

69 views
Skip to first unread message

gregory

unread,
Jan 23, 2012, 11:19:46 AM1/23/12
to Mootools Slideshow
Hi-

Hypothetical question, would the slideshow animations, thumbnails, etc
continue to work if the slideshow width, height, or both were
specified as a percent instead of a fixed pixel count?

Thanks
Greg

gregory

unread,
Jan 24, 2012, 6:58:41 PM1/24/12
to Mootools Slideshow
Hi-

This seems possible if % is set for the slideshow images instead of
px. The only issue is that, on initialize, the dimensions are
calculated and used for the animations (makes sense). If the browser
is resized, however, these dimensions are no longer valid.

Any recommendations on recalculating all of the values as efficiently
as possible on browser resize?

Resizing event exists. Can we make use of it?
var timer;
window.addEvent('resize', function(){
$clear(timer);
timer = (function(){
console.log('resizing');
}).delay(50);
});

Thanks
Greg
Reply all
Reply to author
Forward
0 new messages