모달 대화 상자를 클릭하면이 링크가 나타납니다.첫 번째 링크 만 클릭하면 모달 대화 상자가 표시됩니다.
<a href="#" id="addtoteam">
Add to Team
</a>
이이 링크를 클릭 한 후 표시 될 대화 상자입니다
$('#addtoteam').click(function(event){
event.preventDefault();
var url = '<?php echo BASEURL;?>';
var teamID = '<?php echo $_SESSION['User']['Team']['id']?>';
var playerID = $(this).attr('player-id');
$("#dialogbox").dialog({
autoOpen: true,
buttons: {
"Use Registration Credits": function(){
// execute something here before redirecting it to another page, perhaps perform the updating of the registration_credits of each team here
window.location = url + '/administration/add_to_team/' + playerID +'/'+ teamID +'/?credit=1';
},
"Pay Extra Charge": function() {
//$(this).dialog("close");
window.location = url + '/administration/add_to_team/' + playerID +'/'+ teamID +'/?proceed=1';
},
"Cancel": function() { $(this).dialog("close"); }
},
width: 800
});
});
지금이 작동되지만 첫 번째 링크에서 작동합니다. 당신은 날 귀찮게 무엇
`abc| def| ghi| Add to Teamlink`
`123| 456" 789| Add to Team link` and so on.
내가 abc| def| ghi| Add to Team link
링크를 클릭 할 때 모달 대화 상자가 나타납니다이다, 내 링크는 다음과 같습니다 링크가있는 모든 행에 대한 목록입니다 볼 수 있지만 나는 어떤 링크를 클릭하면 첫 번째 링크 이외의 상자는 나타나지 않습니다. 내 코드에서 문제가되는 것 같습니까? 감사.
thanks.this works. :) –