(function(){
var tags = document.getElementsByTagName('*');
var abs_pos = [];
for (var i = tags.length; i--; ) {
if (getStyle(tags[i], 'position') == 'absolute') {
abs_pos.push(tags[i]);
}
}
console.info(abs_pos);
// Get the computed css property
function getStyle(element, cssRule) {
if (document.defaultView && document.defaultView.getComputedStyle) {
var value = document.defaultView.getComputedStyle(element, '').getPropertyValue(
cssRule.replace(/[A-Z]/g, function(match, char) {
return '-' + char.toLowerCase();
})
);
} else if (element.currentStyle) {
var value = element.currentStyle[cssRule];
} else {
var value = false;
}
return value;
}
}());