admin管理员组文章数量:1430377
Is there any way by which I can show an arrow tip on left of jQuery dialog? I would like to achieve functionality as mentioned in image below. How to do this with Theme roller CSS and icons?
jQuery Dialog Customization .jpg
Is there any way by which I can show an arrow tip on left of jQuery dialog? I would like to achieve functionality as mentioned in image below. How to do this with Theme roller CSS and icons?
jQuery Dialog Customization http://www.freeimagehosting/uploads/74b51bb861.jpg
Share Improve this question edited Aug 13, 2010 at 9:31 kennytm 524k110 gold badges1.1k silver badges1k bronze badges asked Aug 13, 2010 at 8:34 MayurMayur 3,09710 gold badges44 silver badges55 bronze badges2 Answers
Reset to default 4UPDATE: I posted my first answer BEFORE the edit was made, indicating that arrow was to be placed in the body of the dialog, so here is my updated code:
var $mydialog = $('<div></div>').html('<div class="myArrow"></div>Your Dialog Content Here').dialog({autoOpen: false,title: 'Retrieving Product Details', modal:true, width:600, height:400, position:'center'});
The myArrow div has been moved to the main content div of the dialog, CSS could be something like:
.myArrow{
display:block;
position:absolute;
width:15px;
height:15px;
left:-15px; /* pushes the arrow OUTSIDE the box */
top:50px; /* or however far from the top you wish */
background: url(path/to/arrow.jpg) center right no-repeat;
margin:0 15px 0 0;
}
A simple method would be t simply add the html and / or css into your title attribute when constructing your dialog like so:
var $mydialog = $('<div></div>').html('Your Dialog Content Here').dialog({autoOpen: false,title: '<div class="myArrow"></div>Retrieving Product Details', modal:true, width:600, height:400, position:'center'});
$mydialog.dialog('open'); //triggers dialog open event, can close with ('close')
And the css for myArrow:
.myArrow{
display:block;
float:left;
clear:none;
width:15px;
height:15px;
background: url(path/to/arrow.jpg) center center no-repeat;
margin:0 15px 0 0; // some maring on the right to push title away from div;
}
Hope that helps a little
本文标签: javascriptArrow in jQuery DialogStack Overflow
版权声明:本文标题:javascript - Arrow in jQuery Dialog - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745475470a2659943.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论