これらのイベントを.live()イベントハンドラーに変更するにはどうすればよいですか?
$(document).ready(function()... to .... $(document).live(function()、.keydown、.dataを.liveに変更できると思いましたが、できません。それが機能するようです...助けてください。
$(document).ready(function(){
$('#number').bind('keyup change focus', function(){
var field = this;
timer = setTimeout(function(){runSearch(field);}, 444);});
$('#number').keydown(function(){clearTimeout(timer);});
//url selection by specifics
$('#phone_book tr').data('bgcolor', '#aaf').hover(function(){
var $this = $(this);
var newBgc = $(this).data('bgcolor');
$(this).data('bgcolor', $(this).css('background-color')).css('background-color', newBgc);
});
//url selection by specifics
$("#phone_book tr").click(function(){
var id = $(this).children().first().html();
var type = $(this).parents('table').siblings('div.module_header').html().toLowerCase();