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

伟大创意的诞生

伟大创意的诞生

史蒂文·约翰逊 (Steven Johnson) / 盛杨燕 / 浙江人民出版社 / 2014-8-1 / CNY 52.90

 大家都认得出好创意。印刷机、铅笔、抽水马桶、电池、互联网、GPS、Google——这些都是绝妙的创意。然而,它们是如何产生的?被喻为“科技界的达尔文”的作者,在《伟大创意的诞生》一书中,提供了深具启示意义以及有论证实据的答案。  作者史蒂文•约翰逊以富有感染力、包罗万象的风格游历于多重领域,从神经生物学、都市研究,到网络文化,找出了独特创新背后的7大关键模式,深入人类600年重要发明的......一起来看看 《伟大创意的诞生》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

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

URL 编码/解码