diff --git a/src/js/hopscotch.js b/src/js/hopscotch.js index de6b012d..e45e9d2d 100644 --- a/src/js/hopscotch.js +++ b/src/js/hopscotch.js @@ -350,9 +350,6 @@ if (result) { return result; } - if (document.querySelector) { - return document.querySelector(target); - } if (hasJquery) { result = jQuery(target); return result.length ? result[0] : null; @@ -361,6 +358,9 @@ result = new Sizzle(target); return result.length ? result[0] : null; } + if (document.querySelector) { + return document.querySelector(target); + } // Regex test for id. Following the HTML 4 spec for valid id formats. // (http://www.w3.org/TR/html4/types.html#type-id) if (/^#[a-zA-Z][\w-_:.]*$/.test(target)) {