mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 12:16:54 +02:00
search tags
This commit is contained in:
20
public/src/forum/tags.js
Normal file
20
public/src/forum/tags.js
Normal file
@@ -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;
|
||||
});
|
||||
Reference in New Issue
Block a user