0
我有选项卡,并获得与Ajax 每个选项卡的内容,所以我不得不使用.live()函数一些!如何使用.live()和自定义函数?
一些像这样的事情正常工作:
jQuery(function ($) {
$('a.bAddItem').live('click',function(){
$.blockUI({
centerY: false,
message: $('#board_addItem'),
css: { top: '25px', cursor:'default', border:'none', width:'650px' }
});
});
});
,但现在我想用自动保存插件形式: http://raymond.raw.no/jquery-autosave/
这里是代码:
JS:
$(function(){
$("form select,form input,form textarea").autosave({
grouped:true,
success:function(data) {
$("#demodebug").html('');
if ("name" in data)
$("<span>Select:"+data.name+"</span><br/>").appendTo($("#demodebug"));
if ("text" in data)
$("<span>Input:"+data.text+"</span><br/>").appendTo($("#demodebug"));
if ("textarea" in data)
$("<span>Textarea:"+data.textarea+"</span><br/>").appendTo($("#demodebug"));
if ("checkbox" in data)
$("<span>Checkbox: "+data.checkbox+"</span><br/>").appendTo($("#demodebug"));
if ("radio" in data)
$("<span>Radio: "+data.radio+"</span><br/>").appendTo($("#demodebug"));
}
});
});
的代码工作正常的主页,但insdie标签(即来自阿贾克斯)不工作..
的问题是:
如何使用.live()或.livequery()与这个代码?
在此先感谢
嗯,感谢您的回放,但我该怎么做?你能告诉我一个样本示例吗?谢谢 – i7alem 2010-12-16 11:57:36