First of all, i was amazed when i got such a nice feedback from the jQuery community, telling me how they use my plug-in. Most of the people contacted me about it use the floating object for a floating menu in a web site – which i think adds a nice touch to it.
Some of the feedback i got referred me to a bug in the plug-in, This bug happens when the browser size is too small to fit the floating object, and when the user tries to scroll strange things happened.
After examining the code i found the problem and released a new version: 1.2 (yes there was a 1.1 in the middle, but it wasn’t stable enough).
You can download the latest version from jQuey web site: http://plugins.jquery.com/node/9699
Whats New
I’ve fixed the bugs and added a new parameter to the main function: alwaysVisible.
alwaysVisible - true or false (default). If this parameter is set to true, then the new version changes kicks in. If this parameter is not set, or set to false, then the plug-in works as it did in the first version – so there is backward compatibility.
Here is an example of how to use the new parameter:
$("#video").makeFloat({x:"current",y:"current", alwaysVisible:true});
What Was Changed
In the updateLocation method i’ve added the following code:
if( this.alwaysVisible )
{
if( this.origX + this.width > this.windowWidth() )
this.updatedX = this.windowWidth() - this.width + $(window).scrollLeft();
if( this.origY + this.height > this.windowHeight() )
this.updatedY = this.windowHeight() - this.height + $(window).scrollTop();
}
This code is only executed if the user has set the new parameter, otherwise its the same behavior as in the first version.
Basically what i’m checking here is to see if the floating object location and size fits the actual browser window size, and if it doesn’t i try squeeze it to the top/left as much as i can.
That’s it.
If you have any further questions or comments, don’t hesitate to reach me – either by a comment or via twitter: @amir_harel.









Amir – is it possible to freeze columns in a table? I am trying to build a 'Freeze Panes' experience for a long data rows within a table.
Link | May 12th, 2010 at 12:54 am
As long as i you can set an element position to absolute it can work. i haven't tried that with a table so i'll be happy to know more about your experience with it.
Link | May 12th, 2010 at 2:43 am
Amir – is it possible to freeze columns in a table? I am trying to build a 'Freeze Panes' experience for a long data rows within a table.
Link | May 12th, 2010 at 6:54 am
As long as i you can set an element position to absolute it can work. i haven't tried that with a table so i'll be happy to know more about your experience with it.
Link | May 12th, 2010 at 8:43 am
JORGE wrote:
Buy:Tramadol.Viagra Super Active+.Maxaman.Viagra Soft Tabs.Cialis Super Active+.Viagra Professional.Soma.Cialis Soft Tabs.Cialis.Viagra Super Force.Propecia.Levitra.VPXL.Zithromax.Super Active ED Pack.Cialis Professional.Viagra….
Link | September 6th, 2010 at 2:09 pm
GILBERT wrote:
…
BUY FASHION. TOP BRANDS: GUCCI, DOLCE&GABBANA, BURBERRY, DIESEL, ICEBERG, ROBERTO CAVALLI, EMPORIO ARMANI, VERSACE…
Link | November 10th, 2010 at 10:25 pm