This time I will share jQuery Plugin and tutorial about jQuery Plugin To Determine The Fractions For An HTML Element – Fracs, hope it will help you in programming stack.
Fracs is a fancy and stunning jQuery plugin that determines the visible fractions of an HTML element and also provides the coordinates of these areas.
As a bonus there is a page outline feature using canvas
element as seen on the demo page.
Basic Usage:
1. To retrieve the fractions of an element.
01 |
var fracs = $(selector).fracs(); |
03 |
// or bind a callback function: |
05 |
function callback(fracs: Fractions, previousFracs: Fractions) { |
07 |
// context variable *this* will be the corresponding HTMLElement |
11 |
$(selector).fracs(callback);< br type = "_moz" > |
2. Outline.
01 |
< canvas id = "outline" width = "200" height = "400" ></ canvas > |
02 |
$("#outline").fracs("outline", { |
06 |
selector: 'header,footer,section,article', |
07 |
fillStyle: 'rgb(230,230,230)' |
11 |
fillStyle: 'rgb(240,140,060)' |
3. Check the documented source for more usages.
Changelog:
2020-07-30
This awesome jQuery plugin is developed by lrsjng. For more Advanced Usages, please check the demo page or visit the official website.