About


bootstrap.addtabs.js是一个bootstrap的TAB扩展插件。可以使用它自动创建、关闭、折叠、拖动tabs,创建的tabs可以使用ajax/iframe加载,或者直接指定内容。同时,还可以在tabs标签上使用右键关闭、刷新tab。
Bootstrap.addtabs.js is a bootstrap of the tabs extension. You can use it to automatically create, close, drop, drag tabs, create tabs can be used to load ajax / iframe, or directly specify the content. At the same time, you can also use the right tab on the tabs tab to close, refresh the tab.

Change Log


  • 2017/02/15 规范代码
  • 2017/02/09 更改右键菜单,增加右键菜单local设置
  • 2016/12/16 修正点击按钮/链接会刷新已打开TAB
  • 2016/10/13 新增TAB右键菜单,取消右键关闭,注:不希望关闭的tab,不要设置ID
  • 2016/09/20 新增1、直接在TAB上点右键关闭其他TAB,并激活当前tab;2、关闭所有打开TAB的按钮
  • 2016/06/23 隐藏关闭按钮,鼠标指向TAB时显示
  • 2016/02/04 修改主体JS文件,更灵活,更规范
  • 2016/01/25 修改IFrame支持IE,修改一些BUG,增加iframeClass样式表
  • 2015/12/19 重新编写了代码,增加一些参数及函数

Example


Options


Name Type Default description
content string|html 直接指定内容
target string|object 指定tab objectP
close bool true 是否可以关闭
monitor string body 监视的区域
iframeUse bool true 是否使用iframe,false使用ajax
iframeHeight number $(document).height() - 107 iframe高度
contextmenu bool true 是否启用右键菜单
callback function(){} 关闭后回调函数
local
refreshLabel string 刷新此标签 刷新此标签
closeThisLabel string 关闭此标签 关闭此标签
closeOtherLabel string 关闭其他标签 关闭其他标签
closeLeftLabel string 关闭左侧标签 关闭左侧标签
closeRightLabel string 关闭右侧标签 关闭右侧标签