Code Monkey home page Code Monkey logo

pop's Introduction

pop

jq+ES6 构成项目弹窗

第一参数:msg、confirm、tip (必填)

msg 长窗口,可展示多项内容,可以不传入popTit,并在popText传入HTML结构

confirm 短小窗口,展示短小文案,用于确认性提示

tip 提示窗口,几秒后消失

依赖JQ版本1.9 -3.3

//$.pop('msg',{subBtn:'123',popTit:'tit',popText:'content',created:function(){alert(1)}})

{
    subBtn:'',    // * 确认按钮文案,传入文字时自动调出
    subCb:function(){},  // 确认回调
    resBtn:'',          //取消按钮,默认不传入,触碰关闭
    resCb:function(){},  //取消回调
    popTit:'',
    popText:'',           // 内文字,
    className:'',          //传入类
    closeBtnOn:false,      //显示左上角X按钮
    closeCb:function(){},   //X回调
    notClose:false,   //为true时  resBtn,closeBtn不启用关闭功能
    closeTime:2000,   //type为tip时的关闭时长
    mark:true,         //是否遮罩层
    created:function(){},  //弹窗创建时回调
    stopScroll:false,    //禁止页面滚动
    // Return,
    // markAdd,
};

pop's People

Contributors

7plong avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.