Call function on mouse click or Enter keypress

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-09 09:43:05

软件介绍

Typically useful on anchor elements for which following the link should produce javascript functionality instead of the default action (following the URL).

Function binds mouse click and enter keypress to a specified element, and calls the specified function. The default action (e.g. following the href for an anchor) is prevented.

Release 1.2+ supports binding to more than one element, because the callback function is aware of the target of the click / enter keypress.

Usage:

$.clickOrEnter(yourElement,yourFunction);

e.g.
$.clickOrEnter('a',popup);

This essentially replaces the style of

<a target="_blank" rel="nofollow" href="javascript:function();">Foo</a>
<a target="_blank" rel="nofollow" href="foo.html" onclick="function();" onkeypress="function();">Bar</a>

which are inaccessible / obtrusive.

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

CSS

CSS

麦克法兰 / 江苏东南大学 / 2007-6 / 65.00元

《CSS(使用指南)(影印版)》主要内容:层叠样式表(CSS)能让你内心的设计思想迸发出来并得以实现。不过,将CSS与网站底层的HTML页面进行整合是一件非常困难的工作,有时甚至复杂得令人沮丧——这导致多数Web设计者不得不放弃一些奇思妙想。《CSS: The Missing Manual》可以消除Web设计工作的痛苦,并且带给你: HTML——重新入门。如果你是HTML新手,你会学到如何以......一起来看看 《CSS》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具