diff options
| author | Mark Otto <[email protected]> | 2012-06-04 08:33:48 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-06-04 08:33:48 -0700 |
| commit | 37ba0eba024944ab13d2fd093d3e12340430fecd (patch) | |
| tree | 4af1a53c0384f3c2cc01fc8522a1f18841fc0719 /docs/assets/js/bootstrap.js | |
| parent | eb3a4b8f759299e4157bd32deb6016587f48acb4 (diff) | |
| parent | 82ea5847a7188b2798c5dbb0792e53ee8f60db55 (diff) | |
| download | bootstrap-37ba0eba024944ab13d2fd093d3e12340430fecd.tar.xz bootstrap-37ba0eba024944ab13d2fd093d3e12340430fecd.zip | |
Merge branch '2.1.0-wip' of github.com:twitter/bootstrap into 2.1.0-wip
Diffstat (limited to 'docs/assets/js/bootstrap.js')
| -rw-r--r-- | docs/assets/js/bootstrap.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index 3987303e7..c33eb4639 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -312,7 +312,7 @@ , pause: function (e) { if (!e) this.paused = true - if (this.$element.find('.next, .prev') && $.support.transition.end) { + if (this.$element.find('.next, .prev').length && $.support.transition.end) { this.$element.trigger($.support.transition.end) this.cycle() } @@ -755,6 +755,7 @@ this.options = options this.$element = $(content) .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) + this.options.remote && this.$element.find('.modal-body').load(this.options.remote) } Modal.prototype = { @@ -940,9 +941,10 @@ $(function () { $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) { - var $this = $(this), href - , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data()) + var $this = $(this) + , href = $this.attr('href') + , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 + , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) e.preventDefault() $target.modal(option) |
