Minggu, 21 Desember 2014
Minggu, Desember 21, 2014

jqFloat

jqFloat

jqFloat.js is a jQuery plugin that able to make any HTML objects appear to be “floating” on your web page. It helps create simple floating animation and make your websites come alive with these little “floating” object.
You can have several “floating” objects with different attributes within your web page. Also, you might make these floated objects “landing” through plugin’s method, and vice versa of course. See below for more details about this.

How to Use
1. First, of course, you need to include jQuery and jqFloat.js script files inside tag.1
<script src="jquery.min.js"></script>
<script src="jqfloat.js"></script>

It should works well with jQuery 1.7.1 (haven’t tested for lower version).

2. Next, you can make your HTML objects “floating” by calling .jqFloat() function on jQuery object like this:1
$(document).ready(function() {
   $('object').jqFloat();
});

Configuration

.jqFloat( [Method] [, Options] )

Method: Used to control floating object (“play” or “stop”)
Options: An array to configure floating animation.

Options:

width

Type: Int Default: 100
Maximum horizontal floating area. The value will be divided by 2 and append to object left and right.

height
Type: Int Default: 100
Maximum vertical floating area. The value will be divided by 2 and append to object top and bottom.

speed
Type: Int Default: 1000
Maximum floating speed.

minHeight
Type: Int Default: 0
The distance of floating object from bottom/surface.

Example of configuration

$(document).ready(function() {
   //if no method and options specified
   //start the floating animation with defaults settings
   $('object').jqFloat();
   //if only options specified
   //start the floating animation with specified settings
   $('object').jqFloat({
      width: 300,
      height: 300,
      speed: 100
   });
   //stop the floating animation or
   //start landing animation
   $('object').jFloat('stop');
   //start the floating animation
   $('object').jFloat('play');
});

License: jqFloat.js is licensed under the GNU General Public License version 2 or later. You can do whatever you like to the source code.
Next
This is the most recent post.
Posting Lama

1 comments:

 
Online casino