Hi,
It sounds like you want to match each link with a corresponding local-
content div based on the order in which they appear in the DOM. There
isn't a good way to do this with the plugin, but if you don't have too
many of these elements, maybe you could do something like this
(assuming that, in this case, the links all have a class of "load-
local"):
$('a.load-local').each(function(index) {
this.rel += ':eq(' + index + ')';
}).cluetip({local: true});
It's kind of an ugly solution, but it's the best I can think of given
how the plugin is set up.
--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Dec 4, 2008, at 9:16 AM, claudes wrote:
I'm using jcluetip--multiple instances on a page--and i'm using rel to
specify that it pull the data from a class. the markup and the class
is the
same for all elements. i didn't notice initially but the plugin
pulls the
data from the first class instance only and uses it for all of the
tooltips.
i believe this is the code line that is causing issues:
else if (opts.local){
var $localContent = $(tipAttribute + ':first'); // if i
remove +
':first' it pulls all of data for every instance of the class and
replicates
it for all of the tooltips
var localCluetip = $.fn.wrapInner ?
$localContent.wrapInner('<div></div>').children().clone(true) :
$localContent.html();
$.fn.wrapInner ? $cluetipInner.empty().append(localCluetip) :
$cluetipInner.html(localCluetip);
cluetipShow(pY);
any help on how to rework the code so that each tooltip pulls from
its class
instance?
thanks.
--
View this message in context:
http://www.nabble.com/jcluetip-problems-with-multiple-on-a-page-%28when-local-%3D-true%29-tp20834233s27240p20834233.html
Sent from the jQuery General Discussion mailing list archive at
Nabble.com.