What is the most elegant way to check whether an element is in the normal flow using jQuery?
According to the CSS3 specification,
A box belongs t
Instead of looking at it retroactively, you could pre-empt the need for this by using data annotations. Any time you create or define an element, set its attribute data-flow
to true or false.
For example:
var newDiv = document.createElement("div");
newDiv.style.position = "absolute";
newDiv.setAttribute("data-flow","false");
Or in html
And then you could simply select these elements with a selector:
$('*[data-flow=false]')