@tyler.thayn/jquery.actions

0.1.0 • Public • Published

jquery.actions

jQuery extensions supporting element action triggers and handlers

Installation

npm install @tyler.thayn/jquery.actions

Usage

require(['jquery', '../jquery.actions.js'], ($) => {
	$(() => {
		$('.Test').ActionHandler('Show', $.ActionHandlers.Show)
		$('.Test').ActionHandler('Hide', $.ActionHandlers.Hide)
		$('.Test').ActionHandler('Toggle', $.ActionHandlers.Toggle)
		$('.Test').ActionHandler('Bg', function () {
			$(this).css('background-color', '#'+(Math.random()*0xFFFFFF<<0).toString(16))	
		})

		$('button.Hide').on('click', () => {$('.Test').Action('Hide', 'bounce')})
		$('button.Show').on('click', () => {$('.Test').Action('Show', 'pulsate')})
		$('button.Toggle').on('click', () => {$('.Test').Action('Toggle', 'fade')})
		$('button.Bg').on('click', () => {$('.Test').Action('Bg')})
	})
})
fetch('https://cdn.jsdelivr.net/npm/@tyler.thayn/jquery.actions@latest/jquery.actions.js').then(t => t.text()).then(eval)

Readme

Keywords

Package Sidebar

Install

npm i @tyler.thayn/jquery.actions

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

383 kB

Total Files

8

Last publish

Collaborators

  • tyler.thayn