Skip to content

Commit

Permalink
updata js
Browse files Browse the repository at this point in the history
  • Loading branch information
junr-he committed Apr 15, 2016
1 parent dfa441c commit d747535
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@ $(function(){
system.mac = p.indexOf("Mac") == 0;
system.x11 = (p == "X11") || (p.indexOf("Linux") == 0);
system.ipad = (navigator.userAgent.match(/iPad/i) != null)?true:false;
//跳转语句,如果是手机访问就自动跳转到wap.baidu.com页面
if (system.win || system.mac || system.xll||system.ipad) {
alert("1")
} else {
alert("2")
}
//if(browser.versions.mobile) {
// $("[data-url]").on("click", function (ev) {
// var url = $(this).attr("data-url");
// ev.preventDefault;
// window.location.href = url;
// });
//}
$("[data-url]").on("click", function (ev) {
var url = $(this).attr("data-url");
if (system.win || system.mac || system.xll||system.ipad) {

} else {
ev.preventDefault;
window.location.href = url;
}

});

var animationEnd="animationEnd webkitAnimationEnd";
$("[data-delay]").each(function(i){
var _this=$(this);
Expand Down

0 comments on commit d747535

Please sign in to comment.