i didn\'t tested this code on iPhone but i\'m sure (tested) it doesn\'t works on android mobiles:
$(\'#search\').live(\'keyup\',function(key){
if(
$(document).on('keyup','#search', function() {
// code
});
or
$(document).delegate('#search', 'keyup', function() {
// code
});
You can also see here
$('#search').live('input paste', yourFunction)
Use .on()
instead of .live()
, because:
.on()
is faster.live()
is deprecatedjQuery 1.7+ .on() vs .live() Review
Try this:
$(document).on('input paste', '#search', yourFunction)