1
관리자 패널 템플릿 확인 상자를 사용하고 있습니다. Jquery Confirm 및 CodeIgniter 삭제
http://themepixels.com/main/themes/demo/webpage/shamcey/elements.html
내가 확인 상자의 확인 버튼 아약스 일부 실 거예요 작업을 클릭
.나는 왜 그것이 작동하지 않는지 이해하지 못합니까? 여기
내 코드 :
// jQuery를 부
<script>
jQuery(document).ready(function(){
if(jQuery('.confirmbutton').length > 0) {
jQuery('.confirmbutton').click(function(){
jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
if(r==true){
var article_id=$(this).attr("id");
$.ajax({
type:"POST",
url: "<?php echo site_url()?>admin/delete",data: "id="+article_id+"&categ=article",asynchronous: true,cashe: false,beforeSend: function(){},
success: function(){
$('#delete_link_'+article_id).hide();
}
});
}
});
});
}
});
</script>
// HTML
<tr id="delete_link_15">
<td>15</td>
<td>1</td>
<td>asg</td>
<td>etc</td>
<td>etc</td>
<td>
<span class="btn-group">
<a class="btn btn-small confirmbutton"><i class="icon-trash"></i></a>
</span>
</td>
</tr>
'console.log ('Before If')'if (r == true)'조건 바로 앞에 있고 console.log ('Inside If')'직후' parent ('tr'). attr ("id"); ('r'== true) {' –
var parca = jQuery (this) .parent ('span'). 이 부분은 작동하지 않습니다. – TahsinGokalp