开发者

JQuery modal popup on specific region

I have a grid and when i change its sorti开发者_开发问答ng order i a loading message appear on grid region and block its content like other modal popup but only on grid region is there any available jquery modal popup meet my needs ? can I configure jqueryUI modal to do this ?


You're looking for jQuery BlockUI, a jQuery plugin that can block the page or an element while loading.


yes jquery UI modal can do this

http://jqueryui.com/demos/dialog/#modal


This is very easy to do with jQuery UI. With the ajaxStart and ajaxStop functions, you can even set up your dialog and forget about it and it will appear every time you use an ajax request on the page. Here's an simple example:

$('#ajax-load').html('<p><img src="images/ajax-loader.gif">').dialog({
  autoOpen: false,
  draggable: false,
  modal: true,
  position: 'center',
  resizable: false,
  closeOnEscape: false,
  open: function(event, ui) {
    return $(".ui-dialog-titlebar-close", $(this).parent()).hide(); //hide the close button
  }
}).ajaxStart(function() {
  return $(this).dialog('open');
}).ajaxStop(function() {
  return $(this).dialog('close');
});

Edit: Oh, you want it for a specific region. That should be possible, but I don't know how to do it off the top of my head. iframes? ;-)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜