Use in operator to check for onsearch support

This commit is contained in:
Wesley Moore 2010-07-10 14:14:25 +10:00
parent cd9d934241
commit b46ff7563d

View file

@ -30,7 +30,7 @@ jQuery(function() {
var input = $('#search input'); var input = $('#search input');
if(input.length > 0) { if(input.length > 0) {
// Setup incremental search on Articles pages // Setup incremental search on Articles pages
if(input.get(0).hasOwnProperty('onsearch')) { if('onsearch' in input.get(0)) {
console.log("Using search event for search"); console.log("Using search event for search");
$('#search label').hide(); $('#search label').hide();
input.bind("search", function() { refresh_search(this) }); input.bind("search", function() { refresh_search(this) });