Top left align block UI message?
I am trying to align block ui message on top left of blocked element but not succeeding ? Does the centerX,centerY options only work for page blocking ?
$('#Block').block({message:'<h2> <IMG SRC="images/ajax-loader.gif开发者_Python百科" /> Please wait...</h2>',centerY:0,css: { border: '3px solid #a00' }});
Here's my way :
<script type="text/javascript" src="http://github.com/malsup/blockui/raw/master/jquery.blockUI.js?v2.34"></script>
<div id="Block" style="border:1px solid #000; width:300px; height:300px; display:block;"><a href="#">coucou</a></div>
$('#Block').block(
{
message:'<h2> <IMG SRC="images/ajax-loader.gif" /> Please wait...</h2>',
centerY:0,
centerX:false,
css: { top: '10px', left: '', right: '10px' }
}
);
jsFiddle
精彩评论