Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/debjitbis08/corejs
A lightweight modular JavaScript framework.
https://github.com/debjitbis08/corejs
Last synced: 22 days ago
JSON representation
A lightweight modular JavaScript framework.
- Host: GitHub
- URL: https://github.com/debjitbis08/corejs
- Owner: debjitbis08
- Created: 2012-05-28T12:56:22.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-25T16:09:48.000Z (over 10 years ago)
- Last Synced: 2024-12-17T11:13:15.157Z (23 days ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
THIS IS OUTDATED. For a better UI Framework ["UIBase"](https://github.com/UsableBytes/UiBase)
CoreJS
======A lightweight modular JavaScript framework.
CoreJS is inspired by:
* The talk by Nicholas C. Zakas - ["Scalable JavaScript Application Architecture"](https://www.youtube.com/watch?v=vXjVFPosQHw) ([Slides](http://www.slideshare.net/nzakas/scalable-javascript-application-architecture)).
* This [article](http://addyosmani.com/largescalejavascript/) by [Addy Osmani](http://twitter.com/addyosmani).
* and [scaleApp](https://github.com/flosse/scaleApp).Please note, presently the internal modules are dependent on jQuery but feel free to modify them based on your preference.
Example Module Code
-------------------```javascript
corejs.register("tabs", function (sb) {
/* Factory function for tabs */
var root, changeTab, activeTab;changeTab = function (showTab) {
$(root).find('.tab-link-item').removeClass('active');
$(root).find('a[href="' + showTab + '"]').parent('.tab-link-item').addClass('active');$(root).find('.tabs-content .content').removeClass('active');
$(root).find(showTab).addClass('active');activeTab = showTab;
};return {
init: function (opts) {
root = opts.el;activeTab = $(root).find('.tab-link-item.active').attr('href');
$(root).find('.tab-links').delegate('.tab-link-item', 'click', function (e) {
changeTab($(this).find('a').attr('href'));sb.publish("tabChanged", {
"activeTab": $(this).find('a').attr('href')
});
});
},
destroy: function () {
$(root).find('.tab-links').undelegate('.tab-link-item', 'click');
}
};
}, {
/* Options for tabs */
'associatedClass': 'tabs-area'
});
```