Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions docs/_themes/basicstrap/static/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}

$parent = $(selector)
$parent = $(document).find(selector)

e && e.preventDefault()

Expand Down Expand Up @@ -436,8 +436,14 @@
* ================= */

$(document).on('click.carousel.data-api', '[data-slide]', function (e) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
var $this = $(this)
var href = $this.attr('href')
if (href) {
href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
}

var target = $this.attr('data-target') || href
var $target = $(document).find(target)
, options = $.extend({}, $target.data(), $this.data())
$target.carousel(options)
e.preventDefault()
Expand Down Expand Up @@ -726,7 +732,7 @@
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}

$parent = $(selector)
$parent = $(document).find(selector)
$parent.length || ($parent = $this.parent())

return $parent
Expand Down Expand Up @@ -1001,7 +1007,10 @@
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this)
, href = $this.attr('href')
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
var target = $this.attr('data-target') ||
(href && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7

var $target = $(document).find(target)
, option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())

e.preventDefault()
Expand Down