Bigger link

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-08 20:57:30

软件介绍

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 target="_blank" rel="nofollow" href="http://www.fusion.com.au/" title="Fusion web site in a new window">Fusion</a></li>
    <li><a target="_blank" rel="nofollow" href="http://jquery.com/" title="The write less, do more, JavaScript library">jQuery</a></li>
    <li><a target="_blank" rel="nofollow" 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.

本文地址:https://codercto.com/soft/d/22960.html

链接

链接

[美]艾伯特-拉斯洛•巴拉巴西 (Albert-László Barabási) / 沈华伟 / 浙江人民出版社 / 2013-8-1 / 59.90元

[内容简介] ★《链接》是《爆发》的作者,艾伯特-拉斯洛•巴拉巴西的成名之作,同时也是复杂网络的奠基之作,社交网络的入门之作。巴拉巴西之前,随机网络理论一直主导者我们的网络思维,是巴拉巴西第一个证明了,我们不是生活在随机世界里,真实网络是无尺度的。 ★巴拉巴西在书中追溯了网络的数学起源,分析了社会学家在此基础上得出的研究成果,最后提出自己的观点:我们周围的复杂网络,从鸡尾酒会、恐怖组织......一起来看看 《链接》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换