亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - Determine whether it is a WeChat browser. The same code will invalidate and take effect?
習(xí)慣沉默
習(xí)慣沉默 2017-05-19 10:38:22
0
2
734

Test address one: (test successful)
http://bbs2.valueonline.cn/we...

Test address two: (test failed)
http://bbs2.valueonline.cn/we...

Determine whether it is the code of WeChat browser:

<script type="text/javascript">
$(function(){
    //判斷是否是微信
    var is_weixn=( function(){
        var ua = navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i)=="micromessenger"){
            return true;
        }
        else{
            $(".header").removeClass("hide");
            $(".footerMeumBox").hide();
            return false;
        }
    })()
})
</script>

The effect you want to achieve: (the head navigation will not be displayed in the WeChat browser, and the bottom navigation will not be displayed in the ordinary browser)

習(xí)慣沉默
習(xí)慣沉默

reply all(2)
為情所困

**Are you sure it is the same code?
Put one code in $(function(){})里,一份不放,當(dāng)然不放的那一份,在執(zhí)行的時(shí)候找不到$(".footerMeumBox")**

過去多啦不再A夢

Come to install the package. . liveStyle installation package, 2860342721@qq.com,,O(∩_∩)OThank you~(≧▽≦)/~ La La La.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template