diff --git a/css/mobile_shop.css b/css/mobile_shop.css index 9a7a6dc96..e721a5e31 100644 --- a/css/mobile_shop.css +++ b/css/mobile_shop.css @@ -59,8 +59,8 @@ a.sanchor_on {background:#626870;color:#fff !important;text-decoration:none} #sidx {padding:0} /* 인덱스 상품 */ -#slide_tab {display:none;margin:0;padding:0} -.slide_tab {display:block!important;position:relative;width:100%;height:50px;background-color:#eee;overflow:hidden} +#slide_tab {margin:0;padding:0;list-style:none;position:relative;width:100%;height:50px;background-color:#eee;overflow:hidden} +#slide_tab li {position:absolute;top:0;left:0;width:80px} #sidx_slide {position:relative;top:0;left:0;width:100%;overflow:hidden} .sidx_slide {position:absolute;top:0;left:0;width:100%} diff --git a/js/jquery.slideview.js b/js/jquery.slideview.js index 00354c536..1b2503a10 100644 --- a/js/jquery.slideview.js +++ b/js/jquery.slideview.js @@ -16,16 +16,62 @@ var $this = this; var $wrap = this.find("#"+cfg.slide_wrap); - var $tab = this.find("#"+cfg.slide_tab); + var $tab = null; + var $tabs; var $slides = this.find(cfg.slide); - $tab.addClass(cfg.tab_class); $slides.addClass(cfg.slide_class); var height; var width = $(window).width(); var count = $slides.size(); var idx = next = 0; + var tabw_width = 0; + var tabs_count = 0; + var tab_width = 0; + + function tab_make() + { + if(count < 1) + return; + + var subj; + var tabs = ""; + + if($tab == null) { + $slides.each(function() { + subj = $(this).find("header h2").text(); + if(subj.length < 1) + subj = " "; + + tabs += "
  • "+subj+"
  • \n"; + }); + + if(tabs != "") { + tabs = ""; + $wrap.before(tabs); + + $tab = $this.find("#"+cfg.slide_tab); + $tabs = $tab.find("li"); + } + } + + tabw_width = $tab.width(); + tabs_count = $tabs.size(); + tab_width = $tabs.eq(0).width(); + + if(tabs_count < 1) { + $tab.remove(); + return; + } + + var li_left = 0; + + if(tabs_count < 3) { + li_left = parseInt((tab_width - (tab_width * tabs_count)) / (tabs_count + 1)); + } else { + } + } function swipe_init() { @@ -105,6 +151,8 @@ return true; } + tab_make(); + $(window).on("load", function(e) { swipe_init(); }); diff --git a/mobile/shop/index.php b/mobile/shop/index.php index e7b49c292..bde959c8d 100644 --- a/mobile/shop/index.php +++ b/mobile/shop/index.php @@ -12,9 +12,6 @@ include_once(G5_MSHOP_PATH.'/shop.head.php');
    - -
    @@ -56,65 +53,7 @@ include_once(G5_MSHOP_PATH.'/shop.head.php');
    더 보기
    -
    -
    -

    추천상품

    -

    추천상품 모음

    -
    - set_mobile(true); - $list->set_type(3); - $list->set_view('it_id', false); - $list->set_view('it_name', true); - $list->set_view('it_cust_price', false); - $list->set_view('it_price', true); - $list->set_view('it_icon', true); - $list->set_view('sns', true); - echo $list->run(); - ?> -
    더 보기
    -
    -
    -
    -

    인기상품

    -

    인기상품 모음

    -
    - set_mobile(true); - $list->set_type(4); - $list->set_view('it_id', false); - $list->set_view('it_name', true); - $list->set_view('it_cust_price', false); - $list->set_view('it_price', true); - $list->set_view('it_icon', true); - $list->set_view('sns', true); - echo $list->run(); - ?> -
    더 보기
    -
    - -
    -
    -

    할인상품

    -

    할인상품 모음

    -
    - set_mobile(true); - $list->set_type(5); - $list->set_view('it_id', false); - $list->set_view('it_name', true); - $list->set_view('it_cust_price', false); - $list->set_view('it_price', true); - $list->set_view('it_icon', true); - $list->set_view('sns', true); - echo $list->run(); - ?> -
    더 보기
    -