Hi Mark,
Thanks a lot for your patience. I believe I've fixed the problem. It was a bad regular expression.

For the time being, you can grab the fixed version here:
https://github.com/kswedberg/jquery-cluetip/tree/master

Here's how it's working now:

- If you use an id selector to target the local tooltip contents, it will use that id by itself. This is what yours does. - if you use something else -- like a tag name or a class name -- it will append ":eq(n)" to the selector. So, if you have two links like <a href="foo" rel="li">one</li> and <a href="foo" rel="li">two</li>, the first link will grab the contents from the first li -- $ ('li:eq(0)') -- and the second will grab contents from the second.

Also, if you don't like putting the "#" in the rel attribute (or whichever attribute you're using), you can use the localPrefix option. For example:

$('a').cluetip({
  local: true,
  localPrefix: '#'
});


--Karl

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




On Apr 28, 2009, at 3:26 AM, Mark Trapp wrote:


Hi Karl,

I'm having a similar issue as described in the original post here:

- I have three divs that I want to use for cluetip: info-1, info-2,
and info-3.
- I have six links: two for each div. They all have the correct rel
attributes set (two have rel="#info-1", and so on).
- Only the first of the six links displays the correct content. While
the rest of the cluetips do show up and they do have the right header,
their content is empty.

I tried the release you've posted here to no avail. I also tried using
the method described above (setting the rel attribute to a class
that's shared by all the divs and placing the divs after each link),
but the cluetips don't display properly: the first three links show
the first div, then the rest show none.

Am I asking too much of cluetip? Or is there a different way to do
this?

Thanks,

Mark Trapp

On Apr 9, 7:21 pm, Karl Swedberg <k...@englishrules.com> wrote:
Hi there Ian,

So sorry about that problem. I believe I've fixed it in a version I've
had up on Github for a couple weeks. Just put together a new release
for it here:

http://plugins.jquery.com/node/7526

Please give that one a try and let me know if you still run into
problems

--Karl

____________
Karl Swedbergwww.englishrules.comwww.learningjquery.com

On Apr 8, 2009, at 10:44 PM, Ian wrote:





Hi,

I'm pretty new to jquery, but I really love the cluetip plugin. I'm
having trouble, though, when I define tips for a series of <a>
elements which each call different local html data. When I use the
"rel" attribute to call distinct attribute values for the <div>s
holding the data (whether id or class), I only get data in the first
cluetip. For the rest I get the tip but it's empty.

Here's the script in my <head>:

$(document).ready(function() {
$('a.load-local').cluetip({local:true, hideLocal: true, sticky: true,
arrows: true, cursor: 'pointer'});
});

And here's the html in the body:

<a class="load-local" href="#" rel=".loadme">hover here</a><br />
<div id="loadme" class='loadme'>Here's some content<br />here's
another line.</div>

<a class="load-local" href="#" rel=".loadmeToo">hover here too</
a><br /

<div id="loadAgain" class="loadmeToo">Here's some different content.</
div>

<a class="load-local" href="#" rel=".loadmeToo2">hover here too</
a><br />
<div id="loadStillAgain" class="loadmeToo2">Here's some really
different content.</div>

If I use the "rel" attribute of all the links to call one common class for the data <div>s then I get the appropriate data showing up in each tip. But then only the first data <div> is hidden. All the rest in the series are left visible in the document body (as well as being cloned
in the cluetip).

Here's the html I'm using in that case:

<a class="load-local" href="#" rel=".loadme">hover here</a><br />
<div id="loadme" class='loadme'>Here's some content<br />here's
another line.</div>

<a class="load-local" href="#" rel=".loadme">hover here too</ a><br />
<div id="loadAgain" class='loadme'>Here's some different content.</
div>

<a class="load-local" href="#" rel=".loadme">hover here too</ a><br />
<div id="loadStillAgain" class='loadme'>Here's some really different
content.</div>

Am I doing something wrong? This is a trivial example, of course, but
the principle applies to a larger web-app I'm working on.

Thanks,

Ian

Reply via email to