I would like to know how to create jquery function that I could then call with parameters name and value declared in it.
Instead of giving in correct order variables to function like this:
myFunction("My function name",true,false);
I would like to give to function something like that:
function({
displayName: "My function name",
editable: true,
displayForm: false;
})
where order of parameters dosnt matter, cause I am giving it by theier name.
I've saw that configuration in every jquery lib (jqPlot,JqGrid,noty etc.) Here is example:
$(document).ready(function(){
var plot1 = $.jqplot('chart1', [cosPoints], {
series:[{showMarker:false}],
axes:{
xaxis:{
label:'Angle (radians)'
},
yaxis:{
label:'Cosine'
}
}
});
});
--Edited--
I have my own js function to print trees from json, but I have so much parameters, that it is so hard to read and edit.