想把下面一段JS代码改成点击直接打开全图,而不是先判断、打开小图,请高手帮忙。 20
initEventsHandler=function(){//clickonaimage$iw_thumbs.delegate('li','click',function...
initEventsHandler = function() {
// click on a image
$iw_thumbs.delegate('li', 'click', function() {
if($iw_ribbon.is(':animated')) return false;
var $el = $(this);
if($el.data('ribbon')) {
showFullImage($el);
}
else if(!isRibbonShown) {
isRibbonShown = true;
$el.data('ribbon',true);
// set the current
current = $el.index();
showRibbon($el);
}
}); 展开
// click on a image
$iw_thumbs.delegate('li', 'click', function() {
if($iw_ribbon.is(':animated')) return false;
var $el = $(this);
if($el.data('ribbon')) {
showFullImage($el);
}
else if(!isRibbonShown) {
isRibbonShown = true;
$el.data('ribbon',true);
// set the current
current = $el.index();
showRibbon($el);
}
}); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询