My favorites | Sign in
Project Logo
                
Search
for
Updated Mar 16, 2009 by samaxes
Labels: Phase-Implementation, Phase-Deploy
CSSFloatPlugin  
Detecting floating errors jQuery plugin.

CSS Float jQuery plugin

This extension was inspired in a script posted at Browser CSS float error detection with jQuery by Mario Heiderich.

Introduction

The CSS Float plugin is capable of detecting floating errors and adding a border to elements which should be cleared - but aren't.

Installation

Add jQuery JavaScript library and one of the following files to your HTML document:

<!-- Normal version -->
<script src="http://samaxesjs.googlecode.com/files/jquery.cssfloat-1.0.1.js"></script>
<!-- Minified version -->
<script src="http://samaxesjs.googlecode.com/files/jquery.cssfloat-1.0.1.min.js"></script>

Edit your HTML document and add the following code to a script block just before the </body> tag or to a JavaScript external file:

$(document).ready(function() {
    $('body *').cssfloat();
});

Options

Option Type Default
border String 2px dotted orange

Examples

2px dotted orange border:

$('body *').cssfloat();

2px dotted blue border:

$('body *').cssfloat({border: '2px dotted blue'});

Demo

http://samaxes-demos.appspot.com/samaxesjs/cssfloat-jquery.html

Hosted by Google Code