2012-05-12 18 views
0

現在、この画像ギャラリーをjQueryツールで取得して、フェーディングではなくスライドギャラリーを切り替えるようにしています。jQueryツールギャラリーとサムネイルフェードの代わりにスライドする必要があります

http://jquerytools.org/demos/scrollable/gallery.html

私は、私はそれをやって行くだろうか興味がありました。

$(".items img").click(function() { 
// see if same thumb is being clicked 
if ($(this).hasClass("active")) { return; } 

// calclulate large image's URL based on the thumbnail URL (flickr specific) 
var url = $(this).attr("src").replace("_t", ""); 

// get handle to element that wraps the image and make it semi-transparent 
var wrap = $("#image_wrap").fadeTo("medium", 0.5); 

// the large image from www.flickr.com 
var img = new Image(); 


// call this function after it's loaded 
img.onload = function() { 

    // make wrapper fully visible 
    wrap.fadeTo("fast", 1); 

    // change the image 
    wrap.find("img").attr("src", url); 

}; 

// begin loading the image from www.flickr.com 
img.src = url; 

// activate item 
$(".items img").removeClass("active"); 
$(this).addClass("active"); 

// when page loads simulate a "click" on the first image 
}).filter(":first").click(); 

答えて

0

あなたは次のイベントのいずれかを使用することができ、

$(<element>).slideIn(); // display image 
$(<element>).slideOut(); //remove image 
0

var wrap = $("#image_wrap").animate("width", 0);

を試してみてください
関連する問題