1
0
Fork 0
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:
Simon Holywell 2015-07-06 17:01:00 +01:00
parent 855e9ddfc8
commit 0d39c4303c

View file

@ -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({