add js event for searching