限时优惠活动
亲爱的苦力吧用户,我们为了回馈新老用户一直以来的鼎力支持,即日起(2025-02-06至2025-03-06)凡是购买苦力吧VIP/充值K币的新老用户,都直接可获得买一送一的优惠馈赠。例如:购买一个月的VIP会员可直接获得两个月的VIP会员;充值100K币可直接获得200K币,以此类推!有任何疑问可联系在线客服,感谢各位用户对苦力吧素材的信任与厚爱,我们将一如既往的给大家上新更多优质的素材源码,祝大家开工大吉、工作顺利、心想事成。

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网页弹出引导提示提升用户体验特效插件

一款页面引导操作提示插件,引导层循序渐进的交互式提示,帮助用户更好的了解使用网站。
  弹出层
 4308  0

jquery轻量级通知提示插件

一款超级小的通知提示插件,提供了5个主题:默认、成功、暗黑、危险和警告,还可以自定义主题或添加自己的主题。
  弹出层
 2240  0

jquery轻量级带CSS3动画特效的弹出层插件

popup.js是一个超小的弹出层插件,鼠标点击DIV元素触发弹出窗口,带CSS3自定义动画效果,很惊艳。
  弹出层
 1270  0

jquery响应式多类型视频图片文字弹出层插件

一款全屏弹出层插件,在弹出层多类型支持:图片、视频、文本文字。弹出框带左右切换按钮及缩略图列表,支持图片文字描述。
  弹出层
 8267  0

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

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