javascript - Arrow in jQuery Dialog - Stack Overflow

Is there any way by which I can show an arrow tip on left of jQuery dialog? I would like to achieve fun

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 badges
Add a ment  | 

2 Answers 2

Reset to default 4

UPDATE: 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745475470a4629327.html

相关推荐

  • javascript - Arrow in jQuery Dialog - Stack Overflow

    Is there any way by which I can show an arrow tip on left of jQuery dialog? I would like to achieve fun

    4小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信