不使用< title>的jQuery工具提示属性 [英] jQuery Tooltip that doesn't use the <title> attribute

查看:92
本文介绍了不使用< title>的jQuery工具提示属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个不使用<title>属性的jQuery工具提示插件.到目前为止,我已经尝试了一些变体,包括:工具提示,PowerTip,jTip和TipTip!它们都可以工作,但在IE8中不能全部正常工作(这是必须的).它们也都使用<title>属性.

I'm looking for a jQuery tooltip plugin that doesn't use the <title> attribute. I've tried a few variations so far including; Tooltipster, PowerTip, jTip and TipTip! They all work but don't all work properly in IE8 (this is a must). They also all use the <title> attribute.

我需要能够在包含块中使用其他<html>标签,例如<p>等,因此需要使用<title>.使用<div>或类似名称的插件将是完美的,因为我可以根据自己的需要进行自定义并使用相关的<html>标记.

I need to be able to use other <html> tags such as <p> etc within the containing block hence the need to not use <title>. A plugin that uses <div> or similar would be perfect as I can then customise to how I want and use the relevant <html> tags.

我已经搜索过并且搜索过,但是找不到任何东西,因此,如果有人知道我会很感激的!

I've searched and searched and searched but can't find anything, so if anybody knows of one I would greatly appreciate it!

推荐答案

您可以使用

You can use the jQuery Tooltip without title using custom-content like:

$(function () {
    var content = 'We ask for your age only for statistical purposes.';
    $(document).tooltip({
        items: "input",
        content: function () {
            var element = $(this);
            if (element.is("input")) {
                return "<p class='arrow'>" + content + "</p>";
            }
        }
    });
});

现场演示

这篇关于不使用&lt; title&gt;的jQuery工具提示属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆