Select search targets based on class and not element

This fixes the search after changing from buttons to spans.
This commit is contained in:
Jérémie Astori 2016-06-24 02:31:28 -04:00
parent 1438ba6f93
commit 7289844182

View File

@ -771,7 +771,7 @@ $(function() {
chat.on("input", ".search", function() {
var value = $(this).val().toLowerCase();
var names = $(this).closest(".users").find(".names");
names.find("button").each(function() {
names.find(".user").each(function() {
var btn = $(this);
var name = btn.text().toLowerCase().replace(/[+%@~]/, "");
if (name.indexOf(value) === 0) {