mirror of
https://github.com/treffynnon/sqlstyle.guide.git
synced 2025-03-09 12:49:51 -05:00
Prevent error when access non-existent dom elements
This commit is contained in:
parent
855e9ddfc8
commit
0d39c4303c
1 changed files with 3 additions and 1 deletions
|
@ -19,7 +19,9 @@ $(document).ready(function(){
|
|||
var dest = 0;
|
||||
if(target) {
|
||||
var $target = $(target);
|
||||
dest = $target.offset().top;
|
||||
if($target.length) {
|
||||
dest = $target.offset().top;
|
||||
}
|
||||
}
|
||||
|
||||
$('html, body').stop().animate({
|
||||
|
|
Loading…
Reference in a new issue