Hy, problem mantaining big javascript code
I have more than 1000 lines in a big jquery plugin, that is actually a big class, that inludes some others classes, but they开发者_运维百科 have to be in the same file.
I inlcude a piece of code. If you have another way to simplify the code.. The actual problem is that i have a gallery with a lot of things, is dynamic with smart ajax data loading so it requires a lot of classes to use it properly and to cache the data.
(function($){
var TottysGallery = function(element, options, data){
var Core = new function(){...};
var Core2 = new function(){...};
var Core3 = new function(){...};
var Core = function(){...};
};
"The actual problem is that i have a gallery with a lot of things, is dynamic with smart ajax data loading so it requires a lot of classes to use it properly and to cache the data."
It almost sounds like you are trying to store data in JS... why not a SQL database or an XML file or some other means?
精彩评论