Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function T(params) {
- var Library = function(params) {
- this.version = "0.1";
- var selector = document.querySelectorAll(params);
- var i;
- this.length = selector.length;
- for (i = 0; i < this.length; i++) {
- this[i] = selector[i];
- }
- return this;
- }
- Library.prototype = {
- hide: function() {
- var len = this.length;
- while (len--) {
- this[len].style.display = 'none';
- }
- return this;
- },
- show: function() {
- var len = this.length;
- while (len--) {
- this[len].style.display = 'block';
- }
- return this;
- }
- }
- return new Library(params);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement