From 94dbb15b2142e8e894c7862c897276f5976189db Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 26 Jun 2014 22:57:49 -0400 Subject: [PATCH] search tags --- public/src/forum/tags.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 public/src/forum/tags.js diff --git a/public/src/forum/tags.js b/public/src/forum/tags.js new file mode 100644 index 0000000000..49e8913f2f --- /dev/null +++ b/public/src/forum/tags.js @@ -0,0 +1,20 @@ +'use strict'; + +/* globals define, app */ + +define('forum/tags', function() { + var Tags = {}; + + Tags.init = function() { + app.enterRoom('tags'); + + $('#tag-search').on('input propertychange', function() { + $('.tag-list a').each(function() { + var $this = $(this) + $this.toggleClass('hide', $this.attr('href').indexOf($('#tag-search').val()) === -1); + }) + }); + }; + + return Tags; +});