Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

towry-archived/cocover.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cocover.js

cocover.js is a jQuery plugin that make mouseover/mouseenter work while dragging an element.

What Can I Do With This Plugin

Make elements sortable easily?

When dragging an element over another element which has attached an mouseenter/mouseover event, the event wont triggered. So if you want to make that work, you must calculate all the element's coordinate while mouse move, if the elements is few, that's ok, but if the elements is huge, you have to for loop many times in every mouse move, that's not efficient.

You must add <meta http-equiv="X-UA-Compatible" content="IE=8"> to make it work under IE8.

API

#over

Chose what elements to be over while dragging an element.

cocover.over('.item');
// or $('.item').cocover('over');

#destroy

Destroy this ability.

cocover.destroy('.item');
// or $('.item').cocover('destroy');

#start

Only called this method, this plugin can work.

cocover.start();
// or $('.item').cocover('start');

#stop

Stop will make this plugin temporally not work.

cocover.stop();
// or $('.item').cocover('stop');

License

MIT License (http://towry.me/mit-license/)

Releases

No releases published

Packages

No packages published