애니메이션 스킨 높이 지정 스크립트 추가

This commit is contained in:
chicpro
2013-11-27 10:00:27 +09:00
parent 1a0cc8c432
commit 82b294b54f
5 changed files with 40 additions and 3 deletions

View File

@ -120,12 +120,21 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
{
var $smt = this.find("ul.sct_ul");
var $smt_a = $smt.find("a");
var height = $smt.closest("ul").height();
var height = 0;
var count = $smt.size();
var c_idx = o_idx = 0;
var fx = null;
var el_id = this[0].id;
$smt.each(function() {
var h = $(this).height();
if(h > height)
height = h;
});
this.height(height);
$smt.eq(o_idx).siblings().css("top", height+"px");
// 기본 설정값
var settings = $.extend({
interval: 5000,

View File

@ -117,11 +117,20 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
var $smt = this.find("ul.sct_ul");
var $smt_a = $smt.find("a");
var width = $smt.eq(0).width();
var height = 0;
var count = $smt.size();
var c_idx = smt_o_idx = 0;
var fx = null;
var el_id = this[0].id;
$smt.each(function() {
var h = $(this).height();
if(h > height)
height = h;
});
this.height(height);
// 기본 설정값
var settings = $.extend({
interval: 6000,

View File

@ -124,6 +124,15 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
var c_idx = o_idx = 0;
var fx = null;
var el_id = this[0].id;
var height = 0;
$smt.each(function() {
var h = $(this).height();
if(h > height)
height = h;
});
this.height(height);
// 기본 설정값
var settings = $.extend({

View File

@ -120,12 +120,21 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
var $smt = this.find("ul.sct_ul");
var $smt_a = $smt.find("a");
var count = $smt.size();
var height = $smt.height();
var height = 0;
var c_idx = o_idx = 0;
var fx = null;
var delay = 0;
var el_id = this[0].id;
$smt.find("li.sct_li").each(function() {
var h = $(this).height();
if(h > height)
height = h;
});
this.height(height);
$smt.height(height);
// 기본 설정값
var settings = $.extend({
interval: 6000,
@ -135,6 +144,7 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
// 초기실행
if(count > 0 && intervals[el_id] == undefined) {
$smt.find("li.sct_li").css("top", "-"+height+"px");
$smt.eq(0).find("li.sct_li").each(function() {
$(this).delay(delay).animate(
{ top: "+="+height+"px" }, settings.duration

View File

@ -87,7 +87,7 @@
/* 메인 상품 목록 스킨 20 */
.smt_20 {position:relative;overflow-y:hidden}
.smt_20 .sct_ul {display:none;position:absolute;top:306px;left:0;margin:0;padding:0;list-style:none}
.smt_20 .sct_ul {position:absolute;top:0;left:0;margin:0;padding:0;list-style:none}
.smt_20 .sct_ul_first {display:block;top:0}
.smt_20 .sct_li {position:relative;float:left;margin:0 25px 15px 0}
.smt_20 .sct_last {margin:0 0 15px !important}