mirror of
https://github.com/jasny/bootstrap.git
synced 2026-04-24 03:00:49 -04:00
Merge pull request #450 from fstiehle/patch-1
Performance Improvement var $this = $(this);
This commit is contained in:
@@ -189,11 +189,12 @@
|
||||
}
|
||||
|
||||
elements.addClass('canvas-sliding').each(function() {
|
||||
if ($(this).data('offcanvas-style') === undefined) $(this).data('offcanvas-style', $(this).attr('style') || '')
|
||||
if ($(this).css('position') === 'static') $(this).css('position', 'relative')
|
||||
if (($(this).css(placement) === 'auto' || $(this).css(placement) === '0px') &&
|
||||
($(this).css(opposite) === 'auto' || $(this).css(opposite) === '0px')) {
|
||||
$(this).css(placement, 0)
|
||||
var $this = $(this)
|
||||
if ($this.data('offcanvas-style') === undefined) $this.data('offcanvas-style', $this.attr('style') || '')
|
||||
if ($this.css('position') === 'static') $this.css('position', 'relative')
|
||||
if (($this.css(placement) === 'auto' || $this.css(placement) === '0px') &&
|
||||
($this.css(opposite) === 'auto' || $this.css(opposite) === '0px')) {
|
||||
$this.css(placement, 0)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user