jquery响应式支持自定义的提示框插件

所属分类: 网页特效-弹出层    2023-10-30 04:36:22

jquery响应式支持自定义的提示框插件 ie兼容6
 查看演示  登录后下载 温馨提示
登录会员即可享受免费下载
 我要建站

jquery响应式支持自定义的提示框插件(共3个文件)

    • index.html

使用方法

    function simpleAlert(props = {}) {
        if (!window.jQuery) {  
            alert("Please Add Jquery Before this script")
            return;
        }
        if ($('.simple_alert_div').length != 0) {
            $(".simple_alert_div").remove();
        }
        // $(".simple_alert_div").hide('fast', 'swing', function () {
        //     $(".simple_alert_div").remove();
        // });
        let bg_color = props.bg_color
        let text = props.text
        let text_color = props.text_color
        let orientation = props.orientation
        let after_alert = props.after_alert
        $("body").append(`<div class="simple_alert_div" class="text-center py-2 text-white px-4 mx-auto">
        <span id="simple_alert_message"></span>
        </div>`)
        if (text_color) {
            $(".simple_alert_div").css('color', text_color)
        }
        if (!text) {
            text = "这是一条简单的通知提示内容"
        }
        if (bg_color) {
            $(".simple_alert_div").css('background-color', bg_color)
        }

        if (orientation) {
            if (orientation == "bl") {
                $(".simple_alert_div").css('bottom', '10px')
                $(".simple_alert_div").css('left', '10px')
            }
            if (orientation == "tl") {
                $(".simple_alert_div").css('top', '10px')
                $(".simple_alert_div").css('left', '10px')
            }
            if (orientation == "br") {
                $(".simple_alert_div").css('bottom', '10px')
                $(".simple_alert_div").css('right', '10px')
            }
            if (orientation == "tr") {
                $(".simple_alert_div").css('top', '10px')
                $(".simple_alert_div").css('right', '10px')
            }
        } else {
            $(".simple_alert_div").css('bottom', '10px')
            $(".simple_alert_div").css('right', '10px')
        }

        $("#simple_alert_message").html(`${text} <b class="snackbar_dismiss">好的</b>`)
        $(".snackbar_dismiss").click(() => {
            $(".simple_alert_div").hide('fast', 'swing', function () {
                if (after_alert) {
                    after_alert()
                }
                $(".simple_alert_div").remove();
            });
        })

    }

站长提示:
1. 苦力吧素材官方QQ群:950875342
2. 平台上所有素材资源,需注册登录会员方能正常下载。
3. 会员用户积极反馈网站、素材资源BUG或错误问题,每次奖励2K币
4. PHP源码类素材,如需协助安装调试,或你有二次开发需求,可联系苦力吧客服。
5. 付费素材资源,需充值后方能下载,如有任何疑问可直接联系苦力吧客服
相关资源 / 弹出层

jquery响应式支持多类型内容的自定义弹出层插件

KBmodal是一款支持多类型内容的弹窗插件,可在弹出层中显示图片、图集、video视频,还可显示自定义HTML内容。
  弹出层
 6780  0

jquery鼠标悬停table单元格可修改字体/背景颜色插件

一款table单元格颜色编辑插件,在悬停表格单元格时显示一个颜色选择器弹出窗口,点击更改表格文本文字颜色和单元格背景颜色。
  弹出层
 4697  0

jquery简单的图片弹出关闭插件

一款带遮罩层的图片弹出特效,带关闭按钮!
  弹出层
 8779  0

jquery物流发货省市区城市地图地址选择器

鼠标点击input文本框,弹出可点选的矢量地图省份,再点选城市及辖区,最后赋值到文本框。
  弹出层
 4749  0

评论数(0) 回复有机会获得K币 用户协议

^_^ 还没有人评论,快来抢个沙发!
😀
  • 😀
  • 😊
  • 😂
  • 😍
  • 😑
  • 😷
  • 😵
  • 😛
  • 😣
  • 😱
  • 😋
  • 😎
  • 😵
  • 😕
  • 😶
  • 😚
  • 😜
  • 😭
发表评论