Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/371.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript bootstrap.js中的emulateTransitionEnd,它来自哪里?_Javascript_Jquery_Twitter Bootstrap - Fatal编程技术网

Javascript bootstrap.js中的emulateTransitionEnd,它来自哪里?

Javascript bootstrap.js中的emulateTransitionEnd,它来自哪里?,javascript,jquery,twitter-bootstrap,Javascript,Jquery,Twitter Bootstrap,我刚刚调试了modal.js,遇到了以下代码: that.$element.find('.modal-dialog') // wait for modal to slide in .one('bsTransitionEnd', function () { that.$element.trigger('focus').trigger(e) }) .emulateTransitionEnd(Modal.TRANSITION_DURATION) :

我刚刚调试了modal.js,遇到了以下代码:

 that.$element.find('.modal-dialog') // wait for modal to slide in
      .one('bsTransitionEnd', function () {
        that.$element.trigger('focus').trigger(e)
      })
      .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
    that.$element.trigger('focus').trigger(e)
我的问题是关于以下几行:

emulateTransitionEnd(Modal.TRANSITION_DURATION) :
那是什么?jQuery函数?引导中的自定义函数

我在谷歌上搜索过这个函数,但几乎找不到任何东西,我猜这是一个自定义引导函数。但是在我的modal.js(bootstrap.js的子集)中根本看不到这个函数

我在某处看到了以下内容:

这到底是什么?它的定义在哪里?它在做什么


你可以在这里找到我所说的那一行:

这是一个在这里声明的自定义引导函数

它是在$.support.transition.end上触发事件(一次)的函数

$.support.transition.end包含以下事件之一:

  • WebKittTransitionEnd
  • 过渡
  • 转移端
  • 转移端
  • 过渡
你可以在这里找到更多信息


你的grep副本丢了吗@cvrebert,好的,我只有Jquery和modal.js,我正在制作一个modal,我没有transition.js,我的cosnole没有显示任何错误!WHYYY???如果不加载transitions模块,那么将是未定义的,因此给出以下语句
$.support.transition&&this.$element.hasClass('fade')?这是。$background.one('bsTransitionEnd',callbackRemove)。仿真TransitionEnd(Modal.background\u TRANSITION\u DURATION):callbackRemove()
。如果我不包括transitions.js,callbackRemove()将启动??