All Projects → cssmagic → Action

cssmagic / Action

Easy and lazy solution for click-event-binding.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Action

LowLevelInput.Net
A thread safe and event driven LowLevelMouse and LowLevelKeyboard Hook
Stars: ✭ 32 (-65.22%)
Mutual labels:  events, mouse
input-event
🎹 Read and parse input device(like mouse, keyboard, joystick and IR-Remote)'s event data.
Stars: ✭ 45 (-51.09%)
Mutual labels:  events, mouse
Inputsystem
An efficient and versatile input system for Unity.
Stars: ✭ 1,013 (+1001.09%)
Mutual labels:  events, mouse
Indico
Indico - A feature-rich event management system, made @ CERN, the place where the Web was born.
Stars: ✭ 1,160 (+1160.87%)
Mutual labels:  events
Opendataday
Open Data Day website
Stars: ✭ 70 (-23.91%)
Mutual labels:  events
Wanandroid
🔥项目采用 Kotlin 语言,基于 MVP + RxJava + Retrofit + Glide + EventBus 等架构设计,努力打造一款优秀的 [玩Android] 客户端
Stars: ✭ 1,223 (+1229.35%)
Mutual labels:  events
Event Target Shim
An implementation of WHATWG EventTarget interface, plus few extensions.
Stars: ✭ 89 (-3.26%)
Mutual labels:  events
Kaidan
[Replaced by https://invent.kde.org/network/kaidan] Kaidan, a simple and user-friendly Jabber/XMPP client for every device and platform.
Stars: ✭ 67 (-27.17%)
Mutual labels:  click
React Easy Swipe
Easy handler for common swipe operations
Stars: ✭ 85 (-7.61%)
Mutual labels:  mouse
Foxylink
An easy way to handle integration tasks in a reliable way and run them on 1C:Enterprise server
Stars: ✭ 77 (-16.3%)
Mutual labels:  events
Mouse2joystick custom cemu
An AutoHotkey Script to allow the use of Mouse and Keyboard control in CEMU. This uses vJoy and provides several additional features over regular keyboard control, like: the ability to control the camera with the mouse, toggle walking speed, in BotW use MouseWheel to change weapons, a separate Toggle key for ZL useful for locking onto a target in BotW.
Stars: ✭ 76 (-17.39%)
Mutual labels:  mouse
Eventsourcing
Event Sourcing Library for Rust
Stars: ✭ 71 (-22.83%)
Mutual labels:  events
Rabbitevents
Nuwber's events provide a simple observer implementation, allowing you to listen for various events that occur in your current and another application. For example, if you need to react to some event published from another API.
Stars: ✭ 84 (-8.7%)
Mutual labels:  events
Ktmm
Keep That Mouse Moving!
Stars: ✭ 70 (-23.91%)
Mutual labels:  mouse
Neatinput
A .NET standard project which aims to make keyboard and mouse input monitoring easy on Windows and eventually Linux.
Stars: ✭ 89 (-3.26%)
Mutual labels:  mouse
Snaas
Tapglue Social Network as a Service (SNaaS)
Stars: ✭ 67 (-27.17%)
Mutual labels:  events
Historical
A serverless, event-driven AWS configuration collection service with configuration versioning.
Stars: ✭ 85 (-7.61%)
Mutual labels:  events
Melbourne Hackathons
Frequently updated list of Hackathons in Melbourne - Watch the repo for live updates!
Stars: ✭ 75 (-18.48%)
Mutual labels:  events
React Hook Mighty Mouse
🐭 React hook that tracks mouse events on selected element - zero dependencies
Stars: ✭ 75 (-18.48%)
Mutual labels:  mouse
Ease
It's magic.
Stars: ✭ 1,213 (+1218.48%)
Mutual labels:  events

English version is here.

Action

轻松随意绑定点击事件!

用法简介

第一步

先定义一些动作:

action.define({
    'my-action': function () {
        //do something...
    },
    /* ... */
})

第二步

在页面里创建元素:

<button data-action="my-action">btn</button>

<!-- 或这样 -->
<a href="#" data-action="my-action">link</a>

<!-- 或这样 -->
<a href="#my-action" data-action>link</a>

第三步

其实已经不需要第三步了。

点击这个元素就可以触发你定义的那个动作了!

兼容性

依赖以下类库:

  • jQuery(或兼容类库,比如 Zepto)

支持以下浏览器:

  • Chrome / Firefox / Safari 等现代浏览器
  • IE 6+(需要 jQuery 1.x)

体积

  • 源码: 2.7k
  • 压缩后: 0.4k

安装

  1. 通过 npm 3+ 安装:

    $ npm install cmui-action
    
  2. 在页面中加载 Action 的脚本文件及必要的依赖:

    <script src="./node_modules/jquery/dist/jquery.js"></script>
    <script src="./node_modules/cmui-action/src/action.js"></script>
    

API 文档

  • Action 提供了简洁易用的 API,详见此文档
  • 此外,建议阅读 Wiki 来获取更多信息。

单元测试

  1. 把本项目的代码 fork 并 clone 到本地。
  2. 在本项目的根目录运行 npm install,安装必要的依赖。
  3. 在浏览器中打开 test/test.html 即可运行单元测试。

谁在用?

移动 UI 框架 CMUI 采用 Action 作为全局的基础设施,因此所有 CMUI 用户都在使用 Action:


License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].