Hi Nir,
Unfortunately, it's not possible to grab html content from another
domain with javascript -- at least not in any straightforward manner.
The clueTip plugin uses jQuery's $.ajax() method to retrieve contents.
Depending on what's available on the other site and your hosting
environment, you might be able to use jsonp ( http://en.wikipedia.org/wiki/JSONP#JSONP
) or a cross-domain proxy ( http://ajaxpatterns.org/archive/Cross-Domain_Proxy.php
)
--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Apr 27, 2009, at 6:32 PM, Nir wrote:
Hi Karl,
Great plugin.
However, I am more interested in displaying a tip brought from the
web. For instance:
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script src="cluetip/jquery.hoverIntent.js" type="text/javascript"></
script> <!-- optional -->
<script src="cluetip/jquery.cluetip.js" type="text/javascript"></
script>
<script type="text/javascript">
$(document).ready(function() {
$('#sticky').cluetip({sticky: true, closePosition: 'title', arrows:
true});
});
</script>
<a id="sticky" href="http://my.gemeentemuseum.nl/node/27"
rel="http://my.gemeentemuseum.nl/node/27">View the node</a>
<link rel="stylesheet" href="cluetip/jquery.cluetip.css" type="text/
css" />
Unfortunately this doesn't work. It displays a question mark or (at
work) it just got stuck and I had to stop the script.
If I try a local page (e.g. rel="fragment.html") it works perfectly.
Any idea?
thanks,
Nir.