I am not sure about this code. This structure is correct?
success: function(data, data1, data3, .... ) {
switch (data.livre) {
case 'x':
break;
}
switch (data1.livre1) {
case 'y':
break;
}
}
thanks
For future reference here is a code quality tool : jshint
The above is indeed “correct” code as in it will parse correctly. But it can be improved though.
Be wary that you generally pass one result back. So you should get the server to pass an object or array of data back.
The real question is, do you have a problem? and what are you trying to achieve?