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. * 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 * Jan Dittberner IT-Consulting & -Solutions
* Cottbuser Str. 1, D-01129 Dresden * Cottbuser Str. 1, D-01129 Dresden
* *
@ -65,22 +65,41 @@ function updateContentImage(pathParts) {
} }
$(document).ready(function() { $(document).ready(function() {
$("#arrleft").mouseover(function() { if (themetype == 'horizontal') {
$("#scrollable").animate({ $("#arrleft").mouseover(function() {
left: "0px" $("#scrollable").animate({
}, 500); left: "0px"
}).mouseout(function() { }, 500);
$("#scrollable").stop(); }).mouseout(function() {
}); $("#scrollable").stop();
$("#arrright").mouseover(function() { });
offset = parseInt($("#imgscroller").css("width")) - $("#arrright").mouseover(function() {
parseInt($("#scrollable").css("width")); offset = parseInt($("#imgscroller").css("width")) -
$("#scrollable").animate({ parseInt($("#scrollable").css("width"));
left: offset + "px" $("#scrollable").animate({
}, 500); left: offset + "px"
}).mouseout(function() { }, 500);
$("#scrollable").stop(); }).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() { $("#backbtn").click(function() {
$("div.thumbnail img").each(function(i) { $("div.thumbnail img").each(function(i) {
var curparts = getPathParts($("img#contentimg").attr("src")); var curparts = getPathParts($("img#contentimg").attr("src"));