modal diglog box in mvc
how to build/develop a modal diglo开发者_JAVA技巧g box in mvc and how to pop it up on click of a button in jquery
The modal would likely already be in the source of the page already, unless it's something that requires an AJAX call. This is pretty simple to do, and I'd look into the jQuery UI library for their 'dialog' styles. This does pretty much exactly what you want.
http://jqueryui.com/demos/dialog/
From there it's as easy as binding it in jQuery and calling it on click:
<script>
$(function(){
$('#click-for-modal').click(function(){
$('#my-modal-div').dialog();
});
});
</script>
Just use jQuery-UI dialog
精彩评论