pc 쇼핑몰 메인스킨 애니메이션 코드 수정
This commit is contained in:
@ -138,6 +138,13 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
|
|||||||
height = h;
|
height = h;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$smt.each(function(index) {
|
||||||
|
if($(this).is(":visible")) {
|
||||||
|
o_idx = index;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.height(height);
|
this.height(height);
|
||||||
$smt.eq(o_idx).siblings().css("top", height+"px");
|
$smt.eq(o_idx).siblings().css("top", height+"px");
|
||||||
|
|
||||||
@ -197,6 +204,10 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
|
|||||||
function set_interval() {
|
function set_interval() {
|
||||||
if(count > 1) {
|
if(count > 1) {
|
||||||
clear_interval();
|
clear_interval();
|
||||||
|
|
||||||
|
if($("#btn_"+el_id).find("button.sctrl_stop").data("stop") == true)
|
||||||
|
return;
|
||||||
|
|
||||||
intervals[el_id] = setInterval(top_rolling, settings.interval);
|
intervals[el_id] = setInterval(top_rolling, settings.interval);
|
||||||
|
|
||||||
// control 버튼 class
|
// control 버튼 class
|
||||||
@ -238,6 +249,8 @@ $(function() {
|
|||||||
|
|
||||||
// 애니메이션 play
|
// 애니메이션 play
|
||||||
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_play").on("click", function() {
|
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_play").on("click", function() {
|
||||||
|
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_stop").data("stop", false);
|
||||||
|
|
||||||
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
||||||
$("#"+id).topRolling();
|
$("#"+id).topRolling();
|
||||||
//$("#"+id).topRolling({ interval: 2000, duration: 800 });
|
//$("#"+id).topRolling({ interval: 2000, duration: 800 });
|
||||||
@ -250,6 +263,8 @@ $(function() {
|
|||||||
$(this).children().addClass("sctrl_on").html("<b class=\"sound_only\">선택됨</b>");
|
$(this).children().addClass("sctrl_on").html("<b class=\"sound_only\">선택됨</b>");
|
||||||
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
||||||
$("#"+id).topRolling("stop");
|
$("#"+id).topRolling("stop");
|
||||||
|
|
||||||
|
$(this).data("stop", true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -193,6 +193,10 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
|
|||||||
function set_interval() {
|
function set_interval() {
|
||||||
if(count > 1) {
|
if(count > 1) {
|
||||||
clear_interval();
|
clear_interval();
|
||||||
|
|
||||||
|
if($("#btn_"+el_id).find("button.sctrl_stop").data("stop") == true)
|
||||||
|
return;
|
||||||
|
|
||||||
intervals[el_id] = setInterval(left_rolling, settings.interval);
|
intervals[el_id] = setInterval(left_rolling, settings.interval);
|
||||||
|
|
||||||
// control 버튼 class
|
// control 버튼 class
|
||||||
@ -234,6 +238,8 @@ $(function() {
|
|||||||
|
|
||||||
// 애니메이션 play
|
// 애니메이션 play
|
||||||
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_play").on("click", function() {
|
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_play").on("click", function() {
|
||||||
|
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_stop").data("stop", false);
|
||||||
|
|
||||||
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
||||||
$("#"+id).leftRolling();
|
$("#"+id).leftRolling();
|
||||||
//$("#"+id).leftRolling({ interval: 6000, duration: 1500 });
|
//$("#"+id).leftRolling({ interval: 6000, duration: 1500 });
|
||||||
@ -246,6 +252,8 @@ $(function() {
|
|||||||
$(this).children().addClass("sctrl_on").html("<b class=\"sound_only\">선택됨</b>");
|
$(this).children().addClass("sctrl_on").html("<b class=\"sound_only\">선택됨</b>");
|
||||||
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
||||||
$("#"+id).leftRolling("stop");
|
$("#"+id).leftRolling("stop");
|
||||||
|
|
||||||
|
$(this).data("stop", true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -184,6 +184,10 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
|
|||||||
function set_interval() {
|
function set_interval() {
|
||||||
if(count > 1) {
|
if(count > 1) {
|
||||||
clear_interval();
|
clear_interval();
|
||||||
|
|
||||||
|
if($("#btn_"+el_id).find("button.sctrl_stop").data("stop") == true)
|
||||||
|
return;
|
||||||
|
|
||||||
intervals[el_id] = setInterval(itemlist_show, settings.interval);
|
intervals[el_id] = setInterval(itemlist_show, settings.interval);
|
||||||
|
|
||||||
// control 버튼 class
|
// control 버튼 class
|
||||||
@ -225,6 +229,8 @@ $(function() {
|
|||||||
|
|
||||||
// 애니메이션 play
|
// 애니메이션 play
|
||||||
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_play").on("click", function() {
|
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_play").on("click", function() {
|
||||||
|
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_stop").data("stop", false);
|
||||||
|
|
||||||
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
||||||
$("#"+id).itemlistShow();
|
$("#"+id).itemlistShow();
|
||||||
//$("#"+id).itemlistShow({ interval: 4000 });
|
//$("#"+id).itemlistShow({ interval: 4000 });
|
||||||
@ -237,6 +243,8 @@ $(function() {
|
|||||||
$(this).children().addClass("sctrl_on").html("<b class=\"sound_only\">선택됨</b>");
|
$(this).children().addClass("sctrl_on").html("<b class=\"sound_only\">선택됨</b>");
|
||||||
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
||||||
$("#"+id).itemlistShow("stop");
|
$("#"+id).itemlistShow("stop");
|
||||||
|
|
||||||
|
$(this).data("stop", true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -209,6 +209,10 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
|
|||||||
function set_interval() {
|
function set_interval() {
|
||||||
if(count > 1) {
|
if(count > 1) {
|
||||||
clear_interval();
|
clear_interval();
|
||||||
|
|
||||||
|
if($("#btn_"+el_id).find("button.sctrl_stop").data("stop") == true)
|
||||||
|
return;
|
||||||
|
|
||||||
intervals[el_id] = setInterval(item_drop, settings.interval);
|
intervals[el_id] = setInterval(item_drop, settings.interval);
|
||||||
|
|
||||||
// control 버튼 class
|
// control 버튼 class
|
||||||
@ -250,6 +254,8 @@ $(function() {
|
|||||||
|
|
||||||
// 애니메이션 play
|
// 애니메이션 play
|
||||||
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_play").on("click", function() {
|
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_play").on("click", function() {
|
||||||
|
$("#btn_smt_<?php echo $this->type; ?> button.sctrl_stop").data("stop", false);
|
||||||
|
|
||||||
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
||||||
$("#"+id).itemDrop();
|
$("#"+id).itemDrop();
|
||||||
//$("#"+id).itemDrop({ interval: 3000, duration: 800, delay: 300 });
|
//$("#"+id).itemDrop({ interval: 3000, duration: 800, delay: 300 });
|
||||||
@ -262,6 +268,8 @@ $(function() {
|
|||||||
$(this).children().addClass("sctrl_on").html("<b class=\"sound_only\">선택됨</b>");
|
$(this).children().addClass("sctrl_on").html("<b class=\"sound_only\">선택됨</b>");
|
||||||
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
var id = $(this).closest(".sctrl").attr("id").replace("btn_", "");
|
||||||
$("#"+id).itemDrop("stop");
|
$("#"+id).itemDrop("stop");
|
||||||
|
|
||||||
|
$(this).data("stop", true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user