I never used prototype, jquery is quite ok...
How much I've seen of prototype, I'm sure you can take the jquery code I've posted and convert it to prototype.
Where I call, $(".slide div:nth-child("+page+")").toggle();, you would need to get the href attribute of the element.
In jquery I would do something like this.
As for what you found....
This looks just like a plugin for jquery, with the same name.
I think you need to replace Hotkeys with an element, like in jquery, $(document).bind(); or just leave Hotkeys... what ever..
"alt+a" defines obviously the shortcuts, add is the function that processes the event, while 3 and 4 are passed as argument a and b to the function add.
How much I've seen of prototype, I'm sure you can take the jquery code I've posted and convert it to prototype.
Where I call, $(".slide div:nth-child("+page+")").toggle();, you would need to get the href attribute of the element.
In jquery I would do something like this.
Code:
$(body).load($(".slide div:nth-child("+page+")").attr("href"));
As for what you found....
Code:
function add(a, b) {
alert(parseInt(a) + parseInt(b));
}
Hotkeys.bind("alt+a", add, 3, 4);
This looks just like a plugin for jquery, with the same name.
I think you need to replace Hotkeys with an element, like in jquery, $(document).bind(); or just leave Hotkeys... what ever..
"alt+a" defines obviously the shortcuts, add is the function that processes the event, while 3 and 4 are passed as argument a and b to the function add.