我的代码是
保存
<script type="text/javascript">
jQuery('#step2continue').click(function(){
jQuery('#quizresultsave').trigger('click');
});
单击保存链接时,应该触发以下函数,但这在iphone中无效 - safari。
jQuery("#global_page_user-signup-quizresults").on(handleClick,'#quizresultsave',function(){
jQuery("#global_page_user-signup-quizresults").empty();
jQuery("#global_page_user-signup-quizresults").addClass('taskloading');
jQuery("#global_page_user-signup-quizresults").html('<div class="spinnerlogo"></div>');
jQuery(".container").removeClass('quizresult');
var sSaveUrl = en4.core.staticBaseUrl + 'user/signup/introcomplete/';
var oRpost = new Object();
oRpost.user = '<?php echo $this->userId; ?>';
jQuery.ajax({
url:sSaveUrl,
type: "POST",
data:oRpost,
success:function(data) {
if(data === 'success'){
//var url = en4.core.staticBaseUrl + 'members/home/firstland';
var url = en4.core.staticBaseUrl + 'share_on_socialmedia';
jQuery(location).attr('href',url);
} else {
<?php if($this->level == 7 ){ ?>
loadstep('6','3');
<?php } else {?>
loadstep('7','3');
<?php } ?>
}
}
});
});
这个触发器功能在safari-ipad中不起作用
答案 0 :(得分:0)
你在寻找吗?
<script>
$(document).on("click", "#quizresultsave", function(){
$(this).text("Clicked");
});
$(document).ready(function(){
$('#step2continue').click(function(){
$("#quizresultsave").trigger("click");
});
});
</script>
<div id="step2continue" onclick="">test tes tes test </div>
<div id="quizresultsave" onclick="alert('tt')">testingggggg</div>