From 92136874432287038f5ffc87d989051d0f52598f Mon Sep 17 00:00:00 2001 From: Thomas Burleson Date: Sat, 30 Jan 2016 14:59:54 -0600 Subject: [PATCH] update(docs): menu open to selected/linked demo Thx @stefano-maggiolo Closes #6899. --- docs/app/js/app.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/app/js/app.js b/docs/app/js/app.js index ac44f876d23..270debe3e2d 100644 --- a/docs/app/js/app.js +++ b/docs/app/js/app.js @@ -486,15 +486,11 @@ function(SERVICES, COMPONENTS, DEMOS, PAGES, $location, $rootScope, $http, $wind function (open) { var $ul = $element.find('ul'); - $timeout(function () { - updateHeight(open ? getTargetHeight() : 0); - }, 0, false); - - function updateHeight(targetHeight) { + $timeout(function updateHeight() { $timeout(function () { - $ul.css({ height: targetHeight + 'px' }); + $ul.css({ height: (open ? getTargetHeight() : 0) + 'px' }); }, 0, false); - } + }, 0, false); function getTargetHeight () { var targetHeight;