determine the visible fractions of an HTML element


jQuery.fracs calculates some fractions for an HTML element (visible fraction, fraction of the viewport, ...) and also provides the coordinates of these areas. See a demo to get an impression of some of the features.


To retrieve the fractions of an element use:

var fracs = $(selector).fracs();

this will return an object of type Fractions.

Or bind a callback function:

function callback(fracs: Fractions, prev_fracs: Fractions) {
    // context variable *this* will be the corresponding HTMLElement


The callback function will be called whenever fracs and prev_fracs are unequal. A check will be triggered on every window resize or window scroll event. To trigger it manually use



Currently there is only the documented source code.

Works best with JavaScript enabled!Works best in modern browsers!