首页 > 移动平台 > 详细

移动端自定义错误提示

时间:2016-11-01 19:18:54      阅读:257      评论:0      收藏:0      [点我收藏+]
//错误提示
function alertWrap(Tiptext) {
    var oHtml = ‘<div id="errTip"><span>‘ + Tiptext + ‘</span></div>‘;
    $("#errTip").css({
        ‘top‘: ‘0%‘,
        ‘opacity‘: ‘0‘,
        ‘z-index‘:‘999‘
    });
    $("body").append(oHtml);
    setTimeout(function() {
        $("#errTip").css({
            ‘top‘: ‘50%‘,
            ‘opacity‘: ‘1‘,
            ‘z-index‘:‘999‘
        });
    }, 10)
    setTimeout(function() {
        $(‘#errTip‘).css({
            ‘top‘: ‘0%‘,
            ‘opacity‘: ‘0‘,
            ‘z-index‘:‘-1‘
        });
        setTimeout(function() {
            $("#errTip").remove();
        }, 500);
    }, 2000)
}

技术分享

移动端自定义错误提示

原文:http://www.cnblogs.com/q460021417/p/6020446.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!