Separate initialize, update and destroy functions.

This commit is contained in:
Hyunje Alex Jun
2015-02-11 15:53:41 +00:00
parent 7ab6c5e5ef
commit fa7e169b9f
9 changed files with 888 additions and 795 deletions
+24
View File
@@ -0,0 +1,24 @@
/* Copyright (c) 2015 Hyunje Alex Jun and other contributors
* Licensed under the MIT License
*/
'use strict';
var cls = require('../lib/class')
, d = require('../lib/dom')
, h = require('../lib/helper')
, instances = require('./instances');
module.exports = function (element) {
var i = instances.get(element);
$(element).unbind(i.eventClass());
$(window).unbind(i.eventClass());
$(i.ownerDocument).unbind(i.eventClass());
d.remove(i.scrollbarX);
d.remove(i.scrollbarY);
d.remove(i.scrollbarXRail);
d.remove(i.scrollbarYRail);
h.removePsClass(element);
instances.remove(element);
};