Separate event class factory module.

This commit is contained in:
Hyunje Alex Jun
2015-02-11 15:53:40 +00:00
parent 6d1f558c02
commit 9a89e73cf9
2 changed files with 18 additions and 13 deletions
+17
View File
@@ -0,0 +1,17 @@
/* Copyright (c) 2015 Hyunje Alex Jun and other contributors
* Licensed under the MIT License
*/
'use strict';
var incrementingId = 0;
module.exports = function () {
var id = incrementingId++;
return function (eventName) {
var className = '.perfect-scrollbar-' + id;
if (typeof eventName === 'undefined') {
return className;
} else {
return eventName + className;
}
};
};