Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onload = function () {
- var prev = document.querySelector('input[data-direction="prev"]');
- var next = document.querySelector('input[data-direction="next"]');
- rotator.initButtons(prev, next);
- // ....
- }
- var rotator = rotator || new ImageRotator(".splash > img", "data-index", "visible", "hidden", ".details > img", ".details > div");
- // constructor
- function ImageRotator()
- {
- // ....
- this.initButtons = function (prev, next) {
- prev.onclick = function () {
- that.rotateLeft();
- };
- next.onclick = function () {
- that.rotateRight();
- };
- _prevButton = prev;
- _nextButton = next;
- _refreshContent();
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment