$('#slideLeft').hover(function(e) { $('#innerContainer').stop(); $('#innerContainer').animate({ "left": "0px" }, 5000, "swing") }, function() { $('#innerContainer').stop(); }); $('#slideRight').hover(function(e) { posLeft = $('#thumbnails').offset().left; absLeft = e.pageX - posLeft; hiddenBit = thumbWidth - 500; $('#innerContainer').stop(); $('#innerContainer').animate({ "left": -hiddenBit + "px" }, 5000, "swing") }, function() { $('#innerContainer').stop(); });
$('.thumb').click(function() { htmlStr = $(this).html(); currentLarge = $(this).attr('class').split(' ').slice(-1); if ("p" + (total) == currentLarge) { $('#clickRight').css("backgroundImage", "url(jQuery/allinoneGallery/images/blank.gif)") .attr("alt", "") .attr("title", ""); } else { $('#clickRight').css("backgroundImage", "url(jQuery/allinoneGallery/images/next.gif)") .attr("alt", "Next") .attr("title", "Next"); } if ("p1" == currentLarge) { $('#clickLeft').css("backgroundImage", "url(jQuery/allinoneGallery/images/blank.gif)") .attr("alt", "") .attr("title", ""); } else { $('#clickLeft').css("backgroundImage", "url(jQuery/allinoneGallery/images/previous.gif)") .attr("alt", "Previous") .attr("title", "Prevous"); } /* swap images and information */ $('#fullSize').fadeOut(600, function() { showDiv(htmlStr) }); });
$('#clickRight').click(function() { currentLarge = $('#fullSize img').attr('class'); if ("p" + (total - 1) == currentLarge) { $('#clickRight').css("backgroundImage", "url(jQuery/allinoneGallery/images/blank.gif)") .attr("alt", "") .attr("title", ""); } if ("p" + total != currentLarge) { $('#clickLeft').css("backgroundImage", "url(jQuery/allinoneGallery/images/previous.gif)") .attr("alt", "Previous") .attr("title", "Previous"); htmlStr = $('#innerContainer li.' + currentLarge).next('li').html(); $('#fullSize').fadeOut(600, function() { showDiv(htmlStr) }); } }); $('#clickLeft').click(function() { currentLarge = $('#fullSize img').attr('class'); if ("p2" == currentLarge) { $('#clickLeft').css("backgroundImage", "url(jQuery/allinoneGallery/images/blank.gif)") .attr("alt", "") .attr("title", ""); } if ("p1" != currentLarge) { $('#clickRight').css("backgroundImage", "url(jQuery/allinoneGallery/images/next.gif)") .attr("alt", "Next") .attr("title", "Next"); htmlStr = $('#innerContainer li.' + currentLarge).prev('li').html(); $('#fullSize').fadeOut(600, function() { showDiv(htmlStr) }); } });
$('#autoPlay').toggle(function() { $('#autoPlay').css("backgroundImage", "url(jQuery/allinoneGallery/images/stop.gif)") .attr("alt", "Stop") .attr("title", "Stop"); autoPlay() }, function() { clearTimeout(timer); $('#autoPlay').css("backgroundImage", "url(jQuery/allinoneGallery/images/play.gif)") .attr("alt", "Play") .attr("title", "Play"); });
ここにイメージの説明を記述する・・・