Fixed rendering of documentation widgets if no active item on page

This commit is contained in:
Kurtis Seebaldt and Nick Street
2013-08-14 10:43:51 +01:00
parent ab97810f02
commit 7202e8be26
+4
View File
@@ -85,6 +85,8 @@ $(function(){
var moveItemSlider = function () {
var activeItem = $(".js-item-slider--wrapper .js-item.js-active");
if (activeItem.empty()) return;
var activeItemPosition = activeItem.position();
var activeItemOffset = activeItemPosition.left;
var activeItemWidth = activeItem.outerWidth();
@@ -105,6 +107,8 @@ $(function(){
$(this).siblings().removeClass("js-active");
moveItemSlider();
});
new Spring.ProjectDocumentationWidget();
});