jQuery Plugin To Determine The Fractions For An HTML Element Fracs - Free Download jQuery Plugin To Determine The Fractions For An HTML Element - Fracs

Free Download jQuery Plugin To Determine The Fractions For An HTML Element – Fracs

Posted on

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.

jQuery Plugin To Determine The Fractions For An HTML Element Fracs - Free Download jQuery Plugin To Determine The Fractions For An HTML Element - Fracs
File Size: 79.2 KB
Views Total: 642
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

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();
02  
03 // or bind a callback function:
04  
05 function callback(fracs: Fractions, previousFracs: Fractions) {
06   ...
07   // context variable *this* will be the corresponding HTMLElement
08   ...
09 };
10   
11 $(selector).fracs(callback);<br type="_moz">

2. Outline.

01 <canvas id="outline" width="200" height="400"></canvas>
02 $("#outline").fracs("outline", {
03   crop: true,
04   styles: [
05     {
06       selector: 'header,footer,section,article',
07       fillStyle: 'rgb(230,230,230)'
08     },
09     {
10       selector: 'h1',
11       fillStyle: 'rgb(240,140,060)'
12     }
13   ]
14 });

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.