On Feb 25, 7:27*pm, exiquio <exiq...@gmail. comwrote:
On Feb 25, 7:24*pm, Joost Diepenmaat <jo...@zeekat.n lwrote:
exiquio <exiq...@gmail. comwrites:
On Feb 25, 7:11*pm, Joost Diepenmaat <jo...@zeekat.n lwrote:
That doesn't seem to work. The initial mouse over causes the event to
trigger, but there is not action to follow. I am using mootools for
this. Here is the code:
*[snip]
You want some kind of timeout/interval event to scoll on while the mouse
hasn't move out of the element. I'm not familiar with the library you're
using. You also don't need [code] tags to post code. This is usenet. We
tend to use plain text.
--
Joost Diepenmaat | blog:http://joost.zeekat.nl/|work:http://zeekat.nl/
Thanks. My bad about the tags.
So here is the working code. I will change the intervals, but that
isn't important. Thanks Joost.
window.addEvent ('domready', function(){
// Create a global namespace API
var JD = function(){
/* PRIVATE */
// Create a scrolling object for the team box
var team_scroll = new Fx.Scroll(
'team_side_bar' ,
{
duration: 1000
}
);
var position = 0;
/* END PRIVATE */
/* PUBLIC */
return{
init: function(){
// Register events for team bar scrolling
var topTriggerTimer = function(){};
var bottomTriggerTi mer = function(){};
// TODO (exiquio) adjust pixels
$('top_trigger' ).addEvent('mou seenter', function(event) {
topTriggerTimer = (function(){
team_scroll.scr ollTo(0, position - 116);
position = position - 116;
}).periodical(1 500);
});
$('top_trigger' ).addEvent('mou seleave', function(event) {
$clear(topTrigg erTimer);
});
$('bottom_trigg er').addEvent(' mouseenter', function(event) {
bottomTriggerTi mer = (function(){
team_scroll.scr ollTo(0, position + 116);
position = position + 116;
}).periodical(1 500);
});
$('bottom_trigg er').addEvent(' mouseleave', function(event) {
$clear(bottomTr iggerTimer);
});
}
}
/* END PUBLIC */
}();
// Call init()
JD.init();
});