开发者

How do I give a jQuery Element a fixed position on the page? In other words absolute positioning of a jQuery element

<script type="text/javascript">
$(function() {

 $('a.StackedSystem').hover(function(e) {
  var html = '<div id="StackedSysteminfo">';
  html +=    '<div id="StackedSystemTxt">

    ETTER utilizes the latest technologies for our booster systems, including PLC-Based controls complete with touch-screen panel user interfaces (HMI). The base package includes the gray scale screen as shown; color screens are also available. The PLC not only provides a cleaner interface but provides additional features like automatic logging and time/date stamping of all alarms and shut-downs. 
    Great for trouble-shooting.</div>';

  html +=  '&l开发者_StackOverflow社区t;/div>';    
  $('body').append(html).children('#info').hide().fadeIn(400);
 }, function() {
  $('#StackedSysteminfo').remove();
 });
});
</script>


Take a look at jQuery UI Position, and elaborate on your question. Which element(s)?


$('element').css({"position":"absolute","top":15,"left":10 });

In this example you would be positioning the element 15 px from the top of the page and 10px from the left of the page.

EDIT

Then you could change absolute above to relative and make sure the wrapper is absolutely or relatively positioned.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜