* Fix js error.

This commit is contained in:
Yagami
2019-11-21 11:12:05 +08:00
parent 26a5faf5cd
commit 3945b01696
2 changed files with 10 additions and 4 deletions
@@ -91,8 +91,11 @@ $(function()
});
var $productLi = $('#activeProduct');
var productLi = $productLi[0];
$(".col ul.nav").animate({scrollTop: productLi.offsetTop}, "slow");
if($productLi.length)
{
var productLi = $productLi[0];
$(".col ul.nav").animate({scrollTop: productLi.offsetTop}, "slow");
}
});
</script>
<div class="panel-body">
@@ -75,8 +75,11 @@ $(function()
});
var $projectLi = $('#activeProject');
var projectLi = $projectLi[0];
$(".col ul.nav").animate({scrollTop: projectLi.offsetTop}, "slow");
if($projectLi.length)
{
var projectLi = $projectLi[0];
$(".col ul.nav").animate({scrollTop: projectLi.offsetTop}, "slow");
}
});
</script>
<div class="panel-body">