From 31e8a358c3014d48900f4f266c75a7b62ad66dd3 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sun, 3 Jun 2012 11:24:19 -0700 Subject: check length so that pause, actually pauses --- js/bootstrap-carousel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 1bb8f5a06..f8f3c6451 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -68,7 +68,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() } -- cgit v1.2.3 From 82ea5847a7188b2798c5dbb0792e53ee8f60db55 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sun, 3 Jun 2012 21:26:54 -0700 Subject: adds remote source to modal. Remote source can be specified in href or by providing a remote option #936 --- js/bootstrap-modal.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index fb5da75c3..966339908 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -30,6 +30,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 = { @@ -215,9 +216,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) -- cgit v1.2.3