我有这个幻灯片是从php ic列表生成的,但当我点击小拇指时,他们会不断变化。
无论您点击哪一个,如何让它们保持静止?
这是我的js代码:
$(document).ready(function(){
$("div#dynamiclist_product table tr td img#thumb:first").css("height","700");
$("div#dynamiclist_product table tr td img#thumb:first").css("width","500");
$("div#dynamiclist_product table tr td img#thumb:first").append().appendTo("#big_pic");
$("div#dynamiclist_product table tr td img#thumb").click(function(){
$("div#dynamiclist_product table tr td img#main_pic").hide();
$(this).css("height","700");
$(this).css("width","500");
$(this).append().appendTo("#big_pic");
});});
$("img#thumb").click(function(){
$("img#thumb").css("height","160");
$("img#thumb").css("width","120");
$("img#thumb").append().appendTo("div#thumb");
});
html list:
$list.= '<li id="thumb" style="list-style:none"><img id="thumb" src="' . $var . '" alt="' . $id . '" width="120" height="160" style="border:3px outset silver;" /></li>';