vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js in twitter-bootstrap-rails-2.0 vs vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js in twitter-bootstrap-rails-2.0.0
- old
+ new
@@ -141,14 +141,14 @@
/* CAROUSEL DATA-API
* ================= */
$(function () {
$('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
- var $this = $(this)
- , $target = $($this.attr('data-target') || $this.attr('href'))
+ var $this = $(this), href
+ , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
$target.carousel(options)
e.preventDefault()
})
})
-}( window.jQuery )
\ No newline at end of file
+}( window.jQuery )