JSLint error

JSLint error: "regular expressions should be preceded by a left parenthesis assignment colon or comma"
This commit is contained in:
oskar_cieslik 2015-02-23 11:48:50 +01:00
parent d5c78acc10
commit dfd8a0e921
1 changed files with 2 additions and 2 deletions

View File

@ -8,14 +8,14 @@
var id = location.hash.substring( 1 ),
element;
if ( ! /^[A-z0-9_-]+$/.test( id ) ) {
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
return;
}
element = document.getElementById( id );
if ( element ) {
if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) {
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
element.tabIndex = -1;
}