Nice one! Thanks for posting this. Chances are good that if you ran into the problem, someone else has, too.

--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Sep 25, 2009, at 2:38 AM, boermans wrote:


We noticed an issue with the jquery.linkselect plugin (version 1.2.08)
today.

When the container width would cause it to be positioned off the the
screen it is repositioned incorrectly if there is no title element.

I fixed this in anchorTo function by instead adding the width of the
anchor if there is no title:

// Replace
pos.left = (pos.left - $container.outerWidth()) + $title.outerWidth();

// With
if($title.length)
{
        pos.left = (pos.left - $container.outerWidth()) + $title.outerWidth
();
}
else
{
        pos.left = (pos.left - $container.outerWidth()) + $anchor.outerWidth
();
}

Hope that helps someone out.
Cheers
Ollie
--
http://www.ollicle.com

Reply via email to