I've been looking for a script that combines the autoGrowInput with the JEditable but found none.
2 回答
            0        
        
		
使用通过 jEditable 的事件数据自动初始化的https://github.com/MartinF/jQuery.Autosize.Input :
jQuery(element).editable(save_fn, { 
    data: function(value,settings} { 
        var target = event.target; 
        window.setTimeout(function(){ 
            jQuery(target).find('input').autosizeInput(); 
        });
        return value;
    }
});
值得注意的是,此事件(数据)在实际创建输入元素之前触发,因此使用了超时。在创建输入后,目前似乎没有可用的事件。
于 2014-01-20T03:20:17.620   回答