Bigger link

授权协议 未知
开发语言
所属分类 jQuery 插件、 其他jQuery插件
软件类型 开源软件
地区 不详
投 递 者 国晟睿
操作系统 未知
开源组织
适用人群 未知
 软件概览

Makes it really easy to enable specified element/s to behave as a proxy for their first contained link.

Adds additional css classes to provide the means for the specified element to visually reflect focus and hover states of it's contained link/s.

Requires

jQuery version 1.2.1

Using defaults

Normally this plugin will need very little configuration—although you do need to direct it to the element/s on which you wish it to act.

Use the regular jQuery manner to select an element which contains a link whose behaviour you wish the element to inherit. In this case the <li> elements.

HTML example. (Note the added title attributes will be copied to the <li> elements by the plugin).

<ul class="links">
    <li><a href="http://www.fusion.com.au/" title="Fusion web site in a new window">Fusion</a></li>
    <li><a href="http://jquery.com/" title="The write less, do more, JavaScript library">jQuery</a></li>
    <li><a href="http://www.google.com.au/" title="More about everything in a new window">Google</a></li>
</ul>

JavaScript example:

$('.links li').biggerlink();

Settings for JavaScript pop-ups

Setting follow to false ensures the link will not be followed by the browser as it would by default; Thus not interferring with the action os JavaScript pop-ups applied to the same link. (Note that popwindow() is not part of this plugin).

$('.links li').popwindow().biggerlink({follow:false});

Using custom classes

By default the plugin applies classes to the target elements:

hoverclass - class added to the parent element when hovering over it with you cursor or focusing a link it contains. By default this class is hover.

clickableclass - class added to each selected element which contains at least one link. By default this class is hot. Particularly useful if you wish to make the element appear 'clickable' when the link behaviours are assigned to it.

To avoid possible conflicts with other classes in your document they may be customised:

$('.links li').biggerlink({clickableclass:'yum',hoverclass:'roll'});

Worth noting

The plugin will use the URL of the first link within the selected element. If there is a second link with a different URL it’s action will be overridden - using the URL of the first link instead.

More

Further details can be found on my blog post: Bigger link: easier clicking with jQuery.

Thanks

This code is the product of a few Friday afternoons. During this time my employer, Fusion, allows me and my fellow Fusionites to work on the internal projects that interest us most.

I’m sharing biggerlink in the hope that it can be further polished by people smarter than me; And to, in a small way, give back to others who have contributed to making jQuery brilliant.

  • 今天在批量伪造测试数据时,MySQL收到下面异常:ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes。 这是因为没有调整mysql的默认配置,默认最大只能处理16M的文件,而我要导入的伪造数据有50M的一个SQL。 于是调整配置文件: /etc/my.cnf 修改mysql的最大允许包大小  在[mysql

  • 1. J-Link Device Support Kit JLink 在 V770d 版本上不再沿用之前的添加新设备的方式支持新设备下载,而是使用了一种新的方式。 支持新设备通常需要一个闪存加载器(flashloader),在某些情况下还需要一个脚本来定义设备所需的特殊连接和复位序列。虽然 SEGGER 继续使用新设备更新 J-Link 软件,但在此过程中仍可能遗漏设备。为了使客户能够自行填补空白

  • MySQL server has gone away 问题解决方法,需要的朋友可以参考下。 mysql出现ERROR : (2006, ‘MySQL server has gone away’) 的问题意思就是指client和MySQL server之间的链接断开了。 造成这样的原因一般是sql操作的时间过长,或者是传送的数据太大(例如使用insert … values的语句过长, 这种情况可以通

  • 【Link】: 【Description】 让你用最多n根棍子,组成一个数字,使得它能够被m整除; 数字1..9分别需要用…根棍子. 要求这个数字尽可能地大; 然后输出这个数字. 【Solution】 设f[i][j]表示i位数字,对m的取余结果为j,最少需要多少根棍子; 这个做一下简单的DP就能弄出来; 这里的f数组允许出现前导的0; f数组弄出来以后; 枚举最后的答案有多少位i; 然后如果f[

  • 操作系统是 Ubuntu 16.04,数据库操作显示错误: PDOException: SQLSTATE[08S01]: Communication link failure: 1153 Got a packet bigger than ‘max_allowed_packet’ 修改 my.cnf sudo vi /etc/mysql/my.cnf 增加如下内容: [mysqld] max_al

  • 1、磁盘目录项结构 /*  * The new version of the directory entry.  Since EXT2 structures are  * stored in intel byte order, and the name_len field could never be  * bigger than 255 chars, it's safe to reclaim t

  • HTML5表单检查图像的宽度和高度,如果更大则提醒(HTML5 Form Check image width and height and alert if bigger) 编辑 不是重复的 如果文件尺寸较大而不是大小,则需要停止表单提交。 其他帖子中的一些答案与文件大小有关,我的问题是关于维度。 尺寸和尺寸是两个不同的东西...... 我使用以下表格上传图片。 它工作正常,但因为它是一个商店,我

  • 1  中文乱码: 两种方法: 1)修改配置文件:http://www.cnblogs.com/ndxsdhy/archive/2011/11/19/2255111.html 2)设置:http://www.2cto.com/database/201108/101151.html 2 远程连接: http://zhidao.baidu.com/link?url=sbAd3v6v8sRoKkeNraT

  • 使用laravel-admin发布文章时,报以上错误,原因是详情文件过大, 这是因为没有调整mysql的默认配置,默认最大只能处理16M的文件,发布的数据应该超出这个限制。 于是调整配置文件: /etc/my.cnf windows下是php.ini 修改mysql的最大允许包大小  在[mysqld]部分(不在这部分没用)添加一句:  max_allowed_packet=50M  重启mysq

相关阅读

相关文章

相关问答

相关文档