Archived
1
0
Fork 0

add functions for scrolling up and down in vertical themes (addresses #46)

This commit is contained in:
Jan Dittberner 2009-07-11 19:14:29 +00:00
parent 8c6d98c0b4
commit c99d72ff55

View file

@ -1,7 +1,7 @@
/*
* Image scrolling JQuery code.
*
* Copyright (c) 2007, 2008 Jan Dittberner <jan@dittberner.info>
* Copyright (c) 2007, 2008, 2009 Jan Dittberner <jan@dittberner.info>
* Jan Dittberner IT-Consulting & -Solutions
* Cottbuser Str. 1, D-01129 Dresden
*
@ -65,22 +65,41 @@ function updateContentImage(pathParts) {
}
$(document).ready(function() {
$("#arrleft").mouseover(function() {
$("#scrollable").animate({
left: "0px"
}, 500);
}).mouseout(function() {
$("#scrollable").stop();
});
$("#arrright").mouseover(function() {
offset = parseInt($("#imgscroller").css("width")) -
parseInt($("#scrollable").css("width"));
$("#scrollable").animate({
left: offset + "px"
}, 500);
}).mouseout(function() {
$("#scrollable").stop();
});
if (themetype == 'horizontal') {
$("#arrleft").mouseover(function() {
$("#scrollable").animate({
left: "0px"
}, 500);
}).mouseout(function() {
$("#scrollable").stop();
});
$("#arrright").mouseover(function() {
offset = parseInt($("#imgscroller").css("width")) -
parseInt($("#scrollable").css("width"));
$("#scrollable").animate({
left: offset + "px"
}, 500);
}).mouseout(function() {
$("#scrollable").stop();
});
} else {
$('#arrup').mouseover(function() {
$('#scrollable').animate({
top: "0px"
}, 500);
}).mouseout(function() {
$('#scrollable').stop();
});
$('#arrdown').mouseover(function() {
offset = parseInt($('#imgscroller').css('height')) -
parseInt($('#scrollable').css('height'));
$('#scrollable').animate({
top: offset + "px"
}, 500);
}).mouseout(function() {
$('#scrollable').stop();
});
}
$("#backbtn").click(function() {
$("div.thumbnail img").each(function(i) {
var curparts = getPathParts($("img#contentimg").attr("src"));