diff --git a/node/src/files/examples/feed.js b/node/src/files/examples/feed.js index 9f9bdc264..69b33d24a 100755 --- a/node/src/files/examples/feed.js +++ b/node/src/files/examples/feed.js @@ -1,26 +1,30 @@ $(document) .ready(function() { - var setActive = function(event) { - $(this) - .addClass('active') - .closest('.ui.menu') - .find('.item').not(this) - .removeClass('active') - ; - event.stopPropagation(); - }; - $('.filter.menu .item') .tab() ; $('.left.column .menu .item') - .on('click', setActive) + .on('click', function() { + $(this) + .addClass('active') + .closest('.ui.menu') + .find('.item').not(this) + .removeClass('active') + ; + event.stopPropagation(); + }) ; $('.list .item') - .on('click', setActive) + .on('click', function() { + $(this) + .addClass('active') + .siblings() + .removeClass('active') + ; + }) ; })