From 70bbf41dc344dfb5279c225ce0f93ac32730ae01 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 7 Jan 2016 16:24:14 -0500 Subject: [PATCH] popular/tab component --- public/src/client/popular.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/src/client/popular.js b/public/src/client/popular.js index 2a1a358c82..f7f0cd568e 100644 --- a/public/src/client/popular.js +++ b/public/src/client/popular.js @@ -2,13 +2,16 @@ /* globals define, app, socket*/ -define('forum/popular', function() { +define('forum/popular', ['components'], function(components) { var Popular = {}; Popular.init = function() { app.enterRoom('popular_topics'); - $('.nav-pills li').removeClass('active').find('a[href="' + window.location.pathname + '"]').parent().addClass('active'); + components.get('popular/tab') + .removeClass('active') + .find('a[href="' + window.location.pathname + '"]') + .parent().addClass('active'); }; return Popular;