0
Ajax 으로 모든 탭의 컨텐츠를 얻을 수 있으므로 .live() 함수를 몇 번 사용해야했습니다!.live()를 사용자 정의 함수와 함께 사용하려면 어떻게해야합니까?
JS :
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/
입니다
$(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