在cakephp中使用tooltip [英] Using tooltip in cakephp

查看:175
本文介绍了在cakephp中使用tooltip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的cakephp应用程序中使用工具提示,我有多余的数据在我的数据库表,所以我只是想显示开始的几个字,当用户移动他的光标比我想要整个数据以框结构....

I want to use tooltip in my cakephp application , i have excess data in my database table so i just want to display starting few words and when the user moves his cursor than i want entire data to be displayed in the form of a box structure....

我无法使用工具提示插件。我只是复制我的apps /插件文件中的tooltip文件夹,后来在我的控制器文件中使用像这样

I am not able to us the tooltip plugin . I just copied the tooltip folder in my apps/plugin file and later in my controller file i used like this

 public $helpers = array('tooltip');

但是当我运行我的文件,我得到这个错误。

But when i run my file i get this error.

tooltipHelper could not be found.

tooltip插件中有很多文件。我不知道哪一个用作帮助文件。我是新的cakephp任何人都可以帮助我使用插件????

The tooltip plugin has got many files in it. I am not sure which one to use as the helper file..I am new to cakephp can anyone help me out with using the plugin ????

推荐答案

您需要这样的:

$('title.tooltip').qtip();

如果iam像下面这样做

if iam doing like this below

<title class="tooltip"></title>.

orelse您也可以使用这样

orelse you can also use like this

$title = "This is the crazy little Easy Tooltip Text.";
echo $this->Html->link($this->Html->image('add.gif').''.$title.'',
'javascript:void(0)', array('class' => 'tooltip', 'onclick' => $dialog, 
'escape' => false));

查看 http://www.w3.org/TR/CSS2/selector.html

您可以请参阅此 http://bakery.cakephp.org/articles/andy /

You can see this http://bakery.cakephp.org/articles/andy/2008/06/25/prototip-helper it may help you alot

如果你想在简单的html中使用,尝试这样

If you want to use in simple html try like this

<a id="my_tooltip" href="#" rel="tooltip" data-placement="top" title="mytool">Hello</a>

这篇关于在cakephp中使用tooltip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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