[英]How to display the checkbox on the jquery dialog title bar?
碼:
在“ jQuery”對話框中,
$('#status-dialog')
.dialog({
hide: 'fade',
autoOpen: false,
resizable: true,
title: 'Status',
modal: false
});
Index.cshtml
<div class ="cb-status">
<input id="accept-cb-name" type="checkbox"/>
By Name<br /><br />
</div>
如何在jquery對話框標題(“狀態”)欄上顯示復選框?
在這里檢查演示http://jsfiddle.net/yeyene/GnpQ8/7/
$(document).ready(function(){
$("#dialog-model").dialog({
create: function (event, ui) {
$(".ui-dialog-title").html('<input id="accept-cb-name" type="checkbox"/> By Name');
},
width: 250,
height: 150,
modal: true,
resizable: false
});
// checkbox event
$(document).on('click','.ui-dialog-title input', function(){
alert('Bang !!');
});
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.