1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 21:09:06 +02:00

crude check to make sure element has a # for an id

This commit is contained in:
Jacob Thornton
2012-08-27 21:27:01 -07:00
parent 601e252074
commit 4751a0a274
2 changed files with 19 additions and 1 deletions

View File

@@ -110,7 +110,7 @@
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)