This is the Javascript code to call the Function Alerts it is from Stage6 that I will fully rebuild to bring it back to live :)
// Alerts (in the header)
function Alerts(total) {
this.current_page = 1;
this.last_page = Math.ceil(total / 4);
if (this.current_page == this.last_page) {
$('alert-next-button').className = 'alert-next-inactive';
}
}
This is the Prototype Function it is from DivX Stage6:
Alerts.prototype.next = function () {
if (this.current_page == this.last_page) {
return;
}
new Effect.BlindUp('alerts-' + this.current_page, {
scaleFrom:80,
duration:0.4,
queue:{
position:'end',
scope:'alerts'
}
});
new Effect.BlindDown('alerts-' + (this.current_page + 1), {
scaleTo:80,
duration:0.4,
queue:{
position:'end',
scope:'alerts'
}
});
this.current_page++;
if (this.current_page > 1) {
$('alert-prev-button').className = 'alert-prev';
}
if (this.current_page == this.last_page) {
$('alert-next-button').className = 'alert-next-inactive';
}
}
The Second Prototype function:
Alerts.prototype.previous = function () {
if (this.current_page == 1) {
return;
}
new Effect.BlindUp('alerts-' + this.current_page, {
scaleFrom:80,
duration:0.4,
queue:{
position:'end',
scope:'alerts'
}
});
new Effect.BlindDown('alerts-' + (this.current_page - 1), {
scaleTo:80,
duration:0.4,
queue:{
position:'end',
scope:'alerts'
}
});
this.current_page--;
if (this.current_page == 1) {
$('alert-prev-button').className = 'alert-prev-inactive';
}
if (this.current_page < this.last_page) {
$('alert-next-button').className = 'alert-next';
}
}
I need the HTML Code for this functions. It is reverse engineering :=)
Here is the picture from Stage 6 http://img10.imageshack.us/img10/1733/83630697.png
I have all tested but I have no solution.
Hope someone can help me out.
thisis normally associated with an object/methods, but I don't see any of that context. If you just want a function, then you can just changecurrent_pageandlast_pageto local variables and use it as a normal function.