
Untitled
By: a guest on
Apr 24th, 2012 | syntax:
None | size: 0.59 KB | hits: 9 | expires: Never
var position doesn't display element in Firefox
// Get Blue Element Orb and Store in var 'blueElement'
var blueElement = sym.$("Mephon2");
// Get current postion() of 'blueElement and store it in var called pos
var pos = blueElement.position();
// Get current width/height of blue orb
var width = blueElement.width();
var height = blueElement.height();
//Fade in empty text element, with a string of 'Blue'
$('p').text("Mephon").fadeIn("slow");
// As it fades in, position it using css, relative to blue orb
$('p').css({"left": pos.left + (width/2) + "px","top":pos.top + (height -10) + "px" });