我应该如何使用而不是实时
$("#screen_tutorial_input_action_save")
.live(
"click",
function(event) {
$(this).off(event);
var editIndex = $(this).attr("editIndex");
if (typeof editIndex == "undefined"
|| editIndex == "") {
editIndex = -1;
}
var TutorialDataTemplate = FinalCmsData["response-content"][pageScreen].Json_Data;
var TutorialTemplate = {
"Name" : "$300 Cash - New Player Bonus",
"Description" : "At Winners we believe your loayality should be rewarded. Thats why we created our winners rewards Programs\r\n\r\nQuite Simply the more you bet with us the more you back in rewards.A simple concept,but something we think is very important to make our customers feel valued.\r\n\r\nWhy Join?\r\nHere are just a few reasons to join our rewards program:\r\n-Free to join, it costs nothing\r\n-You will earn Winners Rewards points to every dollar wagered\r\n-No minimum\r\n-Reward points can be used to wager for handicap",
"Image" : "20131202041703_1_blue.png",
"URL" : ""
};
TutorialDataTemplate.id = $(
"#screen_tutorial_id").val();
TutorialDataTemplate.logo = $(
"#screen_tutorial_logo").val();
TutorialDataTemplate.name = $(
"#screen_tutorial_name").val();
TutorialDataTemplate.title = $(
"#screen_tutorial_title").val();
TutorialTemplate.Name = $(
"#screen_tutorial_input_name")
.val();
TutorialTemplate.Description = $(
"#screen_tutorial_input_description")
.val();
TutorialTemplate.Image = $(
"#screen_tutorial_input_file")
.val();
TutorialTemplate.URL = baseServerUrl
+ fileDownloadUrl
+ $("#screen_tutorial_input_file")
.val() + "?downloadType=attached";
if (editIndex == -1) {
TutorialDataTemplate.AndroidTutorial
.push(TutorialTemplate);
} else {
TutorialDataTemplate.AndroidTutorial[editIndex] = TutorialTemplate;
}
ScreenHelper.UpdateScreen("AndroidTutorial",
TutorialDataTemplate, function(
responseObject) {
// Refresh View
loadTemplate(pageId,
"mywinners-body .sec03");
});
event.stopPropagation();
event.preventDefault();
});
}
答案 0 :(得分:1)
喜欢这样
$(document).on('click', '#screen_tutorial_input_action_save', function(event) {
});
或代替document
您可以使用页面上存在的父元素。