How can I load 3 csv files and parse them? When I use the jQuery get method I have to wait for the callback from the get...but how can I wait for all 3 callbacks?
I want to create an object for the following situation:
The object can include one or more stations. Every station can include one or more types. Every type can include one or more diagrams. This elements also should be objects. When I create the "master" object I want to define the following structure (example): 3 stations with the nams "Station1", "Station2" and "Station3" - Station1 should include 2 types -> "Typ1" and "Typ2" - Typ1 should include 3 diagramms - Typ2 should include 1 diagramm - Station2 should include 1 type -> "Typ1" ... - Station3 should include 3 type -> "Typ1", "Typ2" and "Typ3" ...
Is this the correct approach:
jQuery.fn.mytest1 = function() {
var Typ = function(){
typ : "Strom",
diagramme: [],
};
var Diagramm = function(){};
Diagramm.prototype = {
zählertyp: "Strom",
diagrammtyp: "Trend"
};
var Station = function(){};
Station.prototype = {
name: "StationA",
typen: [],
};
When I create such a project, the structure always be the same. Only the number of stations, types and diagrams and the options are different. I have already learned a lot of javascript an jquery but I do not find a hint for such a structure.
I want to visualize my house (lights and raffstores) with jquery mobile to eg. switch the lights with my smartphone. To switch on/off the lights I want to use the toggle slide. But when I use this, I have to create a change function for every slider. Is it possible, to pack the slider with a function in a some kind of object? So when I add a toggle slider the change function is already included?