Coder Social home page Coder Social logo

sojs's Introduction

sojs's People

Contributors

bujichong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sojs's Issues

sobox API

sobox 所有参数

$.sobox.pop({
     /* 弹出类型及类型参数 */
    type : 'content', // 弹窗内容模式:'content','target','ajax','iframe',每个模式分别对应每个参量
    target : null, // target方式,target目标,如 '.detail','#contbox'
    content : null, // content方式,支持html
    iframe : null, // iframe方式,值为iframe目标页链接,如:http:// www.baidu.com/
    ajax:{url:null,data:null,callback:function(){}}, // ajax方式

     /* 位置信息 */
    posType:'center', // 'center,win,doc,tc,bc' 位置类型:居中 | 距window顶部 | 距离doucment顶部定 | top水平居中 | bottom水平居中
    pos:[0,0], // [x,y] 距离document左上角坐标,set模式使用
    offset:[0,0], // [x,y] 弹窗相对本来设定位置偏移量,center模式只改变y轴

     /* 自定义参数 */
    cls : null, // 添加自定义类名
    width:360,height:null, // 宽高属性,iframe模式下,height为iframe高度
    defaultShow:true, // 直接显示pop
    visibility:true, // 默认pop执行后显示(用于部分复杂处理场景)
    title : '提示', // 默认标题
    showTitle:true, // 标题栏隐藏:默认显示
    outCloseBtn : false, //标题上的关闭按钮是否外置 :默认内置
    showMask : true, // 显示遮罩
    onlyOne : false, // 为true时,同一状态下只显示一个pop
    drag :true, // 是否可拖动
    maskClick : true, // 点击背景关闭内容
    btn : [], // {cls:,text'确定',link:,removePop: true,callback:}

     /* 返回事件 */
    beforePop:function(){}, // 窗口打开之前返回事件
    onPop: function(){}, // 窗口打开返回事件
    closePop: function(){} // 窗口关闭返回事件
});

btn参数说明:

  • 默认每个btn元素由一个.a-sopop-btn 的a元素内置一个.s-sopop-btn span元素组成,
{
    cls:null, // 添加类名
    text:'确定', // 默认按钮文字
    link:'#', // 为a添加链接,添加链接后,按钮返回链接指向地址
    removePop: true, // 默认点击按钮关闭弹出层
    callback:function (removePop){} // 返回事件
}
  • 开放接口参数多多,敬请挖掘扩展~

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.