开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜