support anchors in ajax content
April 3, 2008 - 6:46pm — godmar
| Project: | clueTip - flexible, enhanced tooltip |
| Version: | 0.9.6 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
My rel= elements are of this form:
"http://somesite/somepage.html#340"
I'd like clueTip to show the content of http://somesite/somepage.html but position the visible area at anchor #340. Is this possible with the existing scheme, or would an be needed?
Thanks!

Comments
#1
Oops, I mean to say "would an <iframe> be needed"
#2
hi, yeah, that should be possible with a little coding on your part. The relevant option to use is the onShow option. you could put something inside the anonymous function for onShow that would detect the position of your element. Something like this (incomplete):
onShow: function(ct, c){var targetOffset = $('#yourdiv').offset().top;
$('body,html').animate({scrollTop: targetOffset}, 400);
}
#3