Socket
Book a DemoInstallSign in
Socket

doon

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doon

super light weight event driven containers

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Doon - Do On

Super light weight event driven containers.

Why ?

Built a wonderful application in HTML/CSS/JS . Client came around with a new design . Suspecting that this won't be the last I created a way to not need to touch the JS when HTML / CSS change. I create Do On. Needed to relink the JS with the new HTML . As expected Client did it again ( It's okay, its by the hour ). This time all I really needed to change was the HTML and CSS and the JS still worked .

Requirements

  • jQuery 1.4.2+

Example

JS Bin

HTML:

<div data-do="trigger" data-on="click|mouseover|mouseout"></div>

JavaScript:

$(window).on('trigger-init', function(e, target) {
  $(target).html('Click Me');
}).on('trigger-click', function(e, target) {
  $(target).css('color', 'red');
}).on('trigger-mouseout', function(e, target) {
  $(target).css('color', 'blue');
  $(target).css('font-size', '12px');
}).on('trigger-mouseover', function(e, target) {
  $(target).css('font-size', '20px');
});

$('div').doon();

FAQs

Package last updated on 11 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.