Hi Emmanuel,
Sorry for the delay in replying.
If you include the hoverIntent plugin, then you can easily have the
tooltip display after a small, configurable delay
About the tooltip hiding on input focus, I wasn't aware that the
tooltip got the focus when it was shown. Also, the default positioning
puts the tooltip to the side of the invoking element, so it shouldn't
cover it up. I don't think I'm understanding the issue entirely,
though, so if you wouldn't mind clarifying, that would be great.
You can certainly display only part of an ajax requested page.
Probably the best way is to use the data property of the ajaxSettings
option. It works the same way as the data option for $.ajax.
Alternatively, you can process the response text through the
ajaxProcess option. Here is the default, which strips out script,
style, title, and link tags:
ajaxProcess: function(data) {
data = data.replace(/<s(cript|tyle)(.|\s)*?\/
s(cript|tyle)>/g, '').replace(/<(link|title)(.|\s)*?\/(link|title)>/
g,'');
return data;
}
Hmm. that regex is pretty messy. guess I'll have to revisit that
before the next release.
Hope this helps
--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On May 30, 2008, at 11:59 AM, Emmanuel Briot wrote:
On Fri, May 30, 2008 at 5:17 PM, Karl Swedberg
<[EMAIL PROTECTED]> wrote:
You might want to take a look at my clueTip plugin. It allows you to
load the contents of the tooltip with the title attribute, the text
contents of an element on the current page, or the result of an ajax
request. Also, in the most recent version, if you can use a string
as the first argument, it will use that for the contents. Use an
anonymous function and it will use the return value of that function.
I like clueTip, but there are two things I wish it could do:
- display the tooltips only after a small delay (configurable,
although 500ms seems reasonnable)
- automatically hide the tooltip whenever the mouse is pressed:
if you have set the tooltip on an input field, it really
should disappear when you type to give the focus to the input.
Perhaps same on keypress events
I am not sure, also, whether it can take only part of the loaded
ajax document (similar to what load() allows). I use that
in my application where I have a single file containing all the
tooltip texts, and select the one I want. Since the file is
cached on the client, I don't have too many http requests, and I
found it more convenient for internationalization.
I might, of course, have misunderstood the documentation and code,
sorry if that's the case.
regards
Emmanuel