2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

avoid unnecessary HTML string building+parsing

This commit is contained in:
Chris Rebert
2015-03-09 06:47:34 -07:00
parent 253dfc0d3d
commit a14665e73e
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -34,7 +34,10 @@
if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
// if mobile we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
$(document.createElement('div'))
.addClass('dropdown-backdrop')
.insertAfter($(this))
.on('click', clearMenus)
}
var relatedTarget = { relatedTarget: this }