Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 24th, 2012  |  syntax: None  |  size: 0.59 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var position doesn't display element in Firefox
  2. // Get Blue Element Orb and Store in var 'blueElement'
  3. var blueElement = sym.$("Mephon2");
  4. // Get current postion() of 'blueElement and store it in var called pos
  5. var pos = blueElement.position();
  6. // Get current width/height of blue orb
  7. var width = blueElement.width();
  8. var height = blueElement.height();
  9. //Fade in empty text element, with a string of 'Blue'
  10. $('p').text("Mephon").fadeIn("slow");
  11. // As it fades in, position it using css, relative to blue orb  
  12. $('p').css({"left": pos.left  + (width/2) + "px","top":pos.top + (height -10) + "px" });