jQuery: The Write Less, Do More JavaScript Library

Re: clueTip Plugin - Loading specific DIV ID in external html

by Karl Swedberg-2 :: Rate this Message:

Reply to Author | View in Thread


Hi Aaron,

The trick here is to use the ajaxProcess option. Here is an example:

$(document).ready(function() {
   $('a').each(function() {
     var thisHash = this.hash;
     $(this).cluetip({
       ajaxProcess: function(data) {
         var $div = $('<div></div>').append(data).find(thisHash);
      return $div;
       }
     });
   });
});


I put together a little demo page for you:

http://plugins.learningjquery.com/cluetip/demo/ajax-process.html


--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On May 13, 2008, at 11:47 AM, Aaron wrote:

>
> I am setting up the clueTip Plugin from http://plugins.learningjquery.com/cluetip/
> and i see how you can load an external HTML file but it loads
> everything in that file.
>
> I want to have one html file with several divs in that file and have
> cluetip plpugin call the file and only load a specific div from that
> file.
>
> so if i have
>
> SomeFile.html
>
> and in this file i have
>
> Div ID="SomeID1"
> Div ID="SomeID2"
> Div ID="SomeID3"
>
> I want the cluetip to call only one of those div's from the external
> file.
>
> Anyone know how to do this?
>
> I tried setting up the rel="SomeFile.html#SomeID1" but that does not
> work.
>
> Can someone hep or is this even possible?
>
> Thanks so much for the help! :)

 « Return to Thread: clueTip Plugin - Loading specific DIV ID in external html

LightInTheBox - Buy quality products at wholesale price