Skip to content

Instantly share code, notes, and snippets.

@ericf
Created March 15, 2010 00:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericf/332382 to your computer and use it in GitHub Desktop.
Save ericf/332382 to your computer and use it in GitHub Desktop.
YUI().use('node', function(Y){
var testEl, hasPosFixed;
testEl = Y.Node.create('<div></div>').setStyles({
position : 'absolute',
top : '1px',
left : '1px',
width : '0',
height : '0'
});
Y.one('body').appendChild(testEl);
hasPosFixed = testEl.getY() === testEl.setStyle('position', 'fixed').getY();
testEl.remove(true);
alert(hasPosFixed);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment