开发者

modal diglog box in mvc

开发者 https://www.devze.com 2023-02-10 18:04 出处:网络
how to build/develop a modal diglo开发者_JAVA技巧g box in mvc and how to pop it up on click of a button in jqueryThe modal would likely already be in the source of the page already, unless it\'s somet

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

精彩评论

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