모바일에서 메뉴상위클릭

모바일에서 메뉴상위클릭

QA

모바일에서 메뉴상위클릭

본문

안녕하세요 고수님들 도와주세요 ㅠㅜ

작업하다 막혀서 pc버전에는 잘되는데 모바일버전에는 상위링크가 안되는 문제점이 있어서 도와주실수 있을까요? 

2049925450_1581353742.452.png

http://naturalscience.cafe24.com/ 모바일에서는 상위바로 들어갈수 있게 가능할까요...?

도와주세요 ㅠㅠ

 


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
 
if (G5_IS_MOBILE) {
    include_once(G5_THEME_MOBILE_PATH.'/tail.php');
    return;
}
?>
 
</div>
</div>
<div id="aside">
    <div class="close_menu" id="mobile_menu_close">
        <div class="line_box">
            <span class="close-line1"></span>
            <span class="close-line2"></span>
        </div>
    </div>
    <div class="mobile_menu">
        <div id="tnb" class="mobile">
            <?php echo outlogin('theme/basic');?>
        </div>
        <ul>
            <?php
                $sql = " select *
                            from {$g5['menu_table']}
                            where me_use = '1'
                              and length(me_code) = '2'
                            order by me_order, me_id ";
                $result = sql_query($sql, false);
                $gnb_zindex = 999; // gnb_1dli z-index 값 설정용
                $menu_datas = array();
 
                for ($i=0; $row=sql_fetch_array($result); $i++) {
                    $menu_datas[$i] = $row;
 
                    $sql2 = " select *
                                from {$g5['menu_table']}
                                where me_use = '1'
                                  and length(me_code) = '4'
                                  and substring(me_code, 1, 2) = '{$row['me_code']}'
                                order by me_order, me_id ";
                    $result2 = sql_query($sql2);
                    for ($k=0; $row2=sql_fetch_array($result2); $k++) {
                        $menu_datas[$i]['sub'][$k] = $row2;
                    }
 
                }
 
                $i = 0;
                foreach( $menu_datas as $row ){
                    if( empty($row) ) continue; 
                ?>
            <li class="mobile-list">
                <a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>" class="gnb_1da" data-hover="<?php echo $row['me_name'] ?>"><?php echo $row['me_name'] ?>
                    <div class="icon_plus icon">
                        <div class="icon_box">
                            <span class="line"></span>
                            <span class="line line2"></span>
                        </div>
 
                    </div>
                </a>

 
                <?php
                    $k = 0;
                    foreach( (array) $row['sub'] as $row2 ){
 
                        if( empty($row2) ) continue; 
 
                        if($k == 0)
                            echo '<ul class="mb-sub-ul">'.PHP_EOL;
                    ?>
            <li><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>"><?php echo $row2['me_name'] ?></a></li>
            <?php
                    $k++;
                    }   //end foreach $row2
 
                    if($k > 0)
                        echo '</ul>'.PHP_EOL;
                    ?>
            </li>
            <?php
                $i++;
                }   //end foreach $row
 
                if ($i == 0) {  ?>
            <li class="gnb_empty">메뉴 준비 중입니다.<?php if ($is_admin) { ?> <a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
            <?php } ?>
        </ul>
    </div>
</div>
<div class="mask"></div>
 
<script>
    $(function() {
 
        $('.mobile_menu > ul > li > a').click(function() {
            if (!$(this).parent().hasClass('on')) {
                $(this).parent().addClass('on');
            } else {
                $(this).parent().removeClass('on');
            }
 
            $(this).parent().find('ul').slideToggle();
 
            return false;
            $('.mobile_menu > ul > li > a')
        });
        $('.mobile_menu > ul > li > a').bind('touchstart', function(e) {
            $(this).trigger('click');
            e.preventDefault();
        });
 
        $("#mb-open-menu").click(function() {
            $("#aside").animate({
                "right": "0px"
            }, 200);
            $(".mask").css('display', 'block');
 
            $("body").css("position", "fixed");
        });
 
        $("#mobile_menu_close, .mask").click(function() {
            $("#aside").animate({
                "right": "-100%"
            }, 200);
 
            $(".mask").css('display', 'none');
            $("body").css("position", "relative");
        });
 
    });
</script>

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 126,591 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT