ollicle.com: Biggerlink – jQuery plugin
ollicle.com: Biggerlink – jQuery plugin
Biggerlink – jQuery plugin Purpose Demo Updated for jQuery 1.3 How to use it Download Thanks Purpose A jQuery plugin to make it really easy to enable the specified element/s to behave as a proxy for their first contained link. Uses additional css classes to provide the means for the specified element to visually reflect focus and hover states of it's contained link/s. More to read in my blog post: Bigger link: easier clicking with jQuery Requires jQuery version 1.3+ Tested successfully in: Firefox 3.x IE 6,7,8 Safari 3,4 Opera 9 Simple demo With links to more demos. View the source for the CSS, HTML and JavaScript. Basic demonstration Updated for jQuery 1.3 With the release of jQuery 1.3 I have revisited this plugin to improve my understanding of the new event object and fixed some bugs and added some features while I was at it. If you are stuck with jQuery version 1.2 try jquery.biggerlink version 1. How to use it Here are some typical configurations. Defaults Normally this plugin will need very little configuration - although you do need to point it at the element/s on which you wish it to act. HTML of an element which contains a link whose behaviour you wish the element to inherit. In this case theelements.
Fusion
jQuery
JavaScript in the document headWith JavaScript pop-ups Using JavaScript to open the link in a new window is one likely scenario where you will to want to prevent the link’s default action. HTML as above. (Note the added title attributes will be applied to the
elements by the plugin).
Fusion
jQuery
JavaScript. 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.As of version 2 of biggerlink there is now a new default value for follow of 'auto'. In the code above where biggerlink is bound next after the pop-up event setting follow to false in unnecessary. If the click event before biggerlink returns false biggerlink will not cause the link to be followed. Any other events bound to the link will be triggered normally. Multiple links in each biggerlink container By default biggerlink will force all clicked links in the specified container to trigger the first (master) link instead. Although click events bound to other links will fire as well as any applied to the master link. This is typically useful when the multiple links point to the same href. This version of biggerlink introduces a new setting otherstriggermaster (for want of a shorter name!). By default it is set to true. Setting it to false allows links following the first in the assigned container to be independent. Clicking them will not trigger the click events on the master link. Directly hovering or focusing an 'other' link with otherstriggermaster set to false will add an additional class to the biggerlink container - bl-hover2 by default. HTML. Note each li contains two links:
Fusion
Where Ollie works in Adelaide Google search
jQuery
The write less, do more, JavaScript library Google search
Find out more about everything Google search
JavaScript.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. Version 2 introduces a couple more biggerclass - class added to all the contained elements, unless otherstriggermaster is false, in which case it is only applied to the first (master). hoverclass2 - If otherstriggermaster is set to false this additional class is added to the containing element when links other than the first are moused over or focused. CSS applied with this class can override the styles applied by hoverclass to provide visual hints that the function or destination of this link differs from the first. HTML. Nothing new here:
Fusion
jQuery
JavaScript. If by chance these classes conflict with other classes in your document they may be customised:Things not likely to work as expected Nesting assigned biggerlink elements. Using biggerlink alongside events bound with an inline onclick attribute. Middle or right button mouse clicks on the biggerlink area. Known issues Does not work with jQuery live events Form elements contained by a biggerlink element can become unclickable Download version 2 Uncompressed and commented: jquery.biggerlink.js Minimised: jquery.biggerlink.min.js Thanks Plugin by Oliver Boermans. Made easy by jQuery. The first version of this code was 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. This page translated Belorussian translation
ollicle.com: Biggerlink – jQuery plugin的更多相关文章
- The ultimate jQuery Plugin List(终极jQuery插件列表)
下面的文章可能出自一位奥地利的作者, 列出很多jQuery的插件.类似的网站:http://jquerylist.com/原文地址: http://www.kollermedia.at/archiv ...
- JQuery plugin ---- simplePagination.js API
CSS Themes "light-theme" "dark-theme" "compact-theme" How To Use Step ...
- jQuery plugin: Autocomplete 参数及实例
官网:jQuery plugin: Autocomplete (注:此插件已经不再更新.它的继任者是jQuery UI的一部分,) 此插件依赖于 jquery 1.2.6 --- j ...
- Signs of a poorly written jQuery plugin 翻译 (Jquery插件开发注意事项,Jquey官方推荐)
原文链接:http://remysharp.com/2010/06/03/signs-of-a-poorly-written-jquery-plugin/ 原文作者:remy sharp So far ...
- JQuery Plugin 1 - Simple Plugin
1. How do you write a plugin in jQuery? You can extend the existing jQuery object by writing either ...
- [jQuery] 自做 jQuery Plugin - Part 1
有時候寫 jQuery 時,常會發現一些簡單的效果可以重複利用.只是每次用 Copy & Paste 大法似乎不是件好事,有沒有什麼方法可以讓我們把這些效果用到其他地方呢? 沒錯,就是用 jQ ...
- Element DOM Tree jQuery plugin – Firebug like functionality | RockingCode
Element DOM Tree jQuery plugin – Firebug like functionality | RockingCode Element DOM Tree jQuery pl ...
- HTML5 Video player jQuery plugin
<!DOCTYPE html> <html lang="en" > <head> <meta charset="utf-8&qu ...
- JQuery Plugin 开发
学习 JQuery 插件开发之后, 可以将自己平时常用的功能封装成插件, 便于在不同的项目之间使用. JQuery 官网上的 插件开发教程就很不错, 简单易懂. 参考网址: http://learn. ...
随机推荐
- Traveling
Problem J: Traveling Time Limit: 1 Sec Memory Limit: 32 MB Description SH likes traveling around th ...
- SQL Server用户自定义类型与统计信息
用户自定义数据类型不支持统计信息! 所以查询对它的查询会慢一些.
- WIX 学习笔记 - 2 第一个WIX 项目 HelloWIX
程序员们都非常熟悉 Hello World!,基本上所有的语言书都以打印一个 Hello World! 作为第一个代码示例. 我们也要发扬代码界的优良传统,使用 Hello WIX! 作为我们的入门示 ...
- Android程序的入口点
原文:Android程序的入口点 android应用程序,由一到多个Activity组成.每个Activity没有很紧密的联系,因为我们可以在自己的程序中调用其它Activity,特别是调用自己的代码 ...
- [LeetCode][Python]String to Integer (atoi)
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'https://oj.leetcode.com/problems/string- ...
- 网易云课堂_C语言程序设计进阶_第七周:文件:文件访问、格式化输入输出、二进制输入输出
7.1文件 7.2底层操作 7.1文件 格式化的输入输出 printf %[flags][width][.prec][hIL]type Flag 含义 - 左对齐 + 在前面放+或- (space) ...
- UVa 10330 - Power Transmission(最大流--拆点)
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&p ...
- android 三级菜单 BaseExpandableListAdapter
在网上搜了非常长时间.没有找到合适的Android三级菜单.所以就自己动手写了一个,主要使用了BaseExpandableList来实现,通过三个布局文件来完毕相应的菜单项,详细实现请參照下图. wa ...
- Android的应用程序的异常处理2
1.自定义一个类(MaApp)继承Application 2.在清单文件中的Application选项菜单对应的name属性中添加MyApp 3.重写application中的onCreate方法 4 ...
- 从零开始学习UNITY3D(GUI篇 GUI.Window)
unity3d里面,也是包含window窗体的,下面看一下GUI.Window方法的详情 下面我们用代码实现一个通过开关显示窗体的隐藏和显示的功能,代码如下: public class windows ...