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

jquery页面上滚动循环显示控制台消息插件

所属分类: 网页特效-UI滚动    2023-08-30 09:59:06

jquery页面上滚动循环显示控制台消息插件 ie兼容6
 查看演示  登录后下载 温馨提示
登录会员即可享受免费下载
 我要建站

jquery页面上滚动循环显示控制台消息插件(共6个文件)

    • main.css
    • index.html

使用方法

        $(document).ready(function () {
            // Init the consoles
            let con1 = $(".console1").console({ msgDirection: "up" });
            let con2 = $(".console2").console({ history: 15 });
            let con3 = $(".console3").console({ msgDirection: "up", showTimestamp: false, timeout: 3000 });
            let con4 = $(".console4").console({ tagOddEven: true, timestampOnLeft: true });

            // Sample messages to show off the different log levels
            let long_txt = "This is very long alert message. This is very long alert message. This is very long alert message. "
                + "This is very long alert message. This is very long alert message. This is very long alert message. "
                + "This is very long alert message. This is very long alert message. This is very long alert message.";
            let msgs = [
                { txt: "This is a debug message.", level: 7 },
                { txt: "This is an info message.", level: 6 },
                { txt: "This is a notice message.", level: 5 },
                { txt: "This is a warning message.", level: "warning" },    // can use choose using str or int
                { txt: "This is an error message.", level: 3 },
                { txt: "This is a critical message.", level: 2 },
                { txt: "This is an alert message.", level: 1 },
                { txt: "This is an emergency message.", level: 0 },
                { txt: "This is a default message." },                      // no level needs to be provided
                { txt: long_txt, level: 1 }
            ];

            // Generator implementation of writing a message every second from the message array
            function* get_message() {
                let index = 0;
                while (true) {
                    let msg = msgs[index];
                    index = (index + 1) % msgs.length;  // inc index but cycle back to the start if at the end of the list
                    yield msg;
                }
            }
            let msg_generator = get_message();
            
            function writeMessage() {
                let msg = msg_generator.next().value;
                if ("level" in msg) {
                    con1.log(msg["txt"], msg["level"]);
                    con2.log(msg["txt"], msg["level"]);
                    con3.log(msg["txt"], msg["level"]);
                    con4.log(msg["txt"], msg["level"]);
                }
                else {
                    con1.log(msg["txt"]);
                    con2.log(msg["txt"]);
                    con3.log(msg["txt"]);
                    con4.log(msg["txt"]);
                }
            }
            let tid = setInterval(writeMessage, 500);
        });

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

jquery基于swiper幻灯片展示个人图文简介特效

一款个人简介滚动展示特效,默认可根据头像顺序,自动循环切换显示;还可鼠标悬停任务头像实现主动切换。
  UI滚动
 4140  0

jquery页面滚动到指定DIV元素触发函数插件

一款滚动页面显示到指定DIV元素时,自动触发函数事件,很实用!
  UI滚动
 2263  0

jquery水平可左右滚动的时间线插件

一款水平滚动时间线插件,可以从HTML无序的数据列表中生成一个水平滚动的时间线,带左右箭头滚动。
  UI滚动
 9275  0

jquery基于swiper文本内容列表循环滚动特效

一款列表内容滚动效果,一组列表数据右下往上自动循环滚动,可自定义设置滚动速度、是否循环等参数。
  UI滚动
 1135  0

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

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