开发者

How to replace title tags with QTIP

Consider me a complete newbie! I just want title tags r开发者_开发问答eplace with QTIP. I've installed qtip and jquery on my server, I just don't know how to replace title tags.

<script type="text/javascript" src="/tip/jquery.1.3.2.min.js"></script>
<script type="text/javascript" src="/tip/jquery.qtip-1.0.0-rc3.min"></script>
<script type="text/javascript">
Does something go here?
</script>


The code sample below is from here: http://craigsworks.com/projects/qtip/docs/#replace

$('a[title]').qtip({ style: { name: 'cream', tip: true } })

That line of code will replace all the 'title' attributes of HTML anchors with the qTip tool-tips.

So inside your script block where you wrote 'Does something go here?', you would want to wrap the above line within a jquery 'ready' function:

$(function () {
    // the qTip code above goes here, in order to call on document-load
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜