-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
subiendo trabajo #11
base: master
Are you sure you want to change the base?
subiendo trabajo #11
Conversation
}); | ||
} | ||
|
||
function showBooks() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todos estos "showBooks", "showArt", "show..." son exactamente iguales excepto por el URL de mercadolibre. Recomendaria tener solo una version del function que le puedas pasar una variable y tener un map de tema->URL donde puedas accesar todo. algo asi:
var dataMap = new Object();
map[tech] = 'https://api.mercadolibre.com/sites/MLC/search?q=tecnologia'
map[art] = 'https://api.mercadolibre.com/sites/MLC/search?q=arte'
...
function showContent(category) {
document.getElementById('app').innerHTML = '';
var data = fetch(map[category]);
...
}
}()); | ||
|
||
|
||
// $('#lol').click(function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
olvidaste borrar esto?
{id: data.results[i].id}] | ||
}); | ||
document.getElementById('app').innerHTML += quoteData; | ||
// $('#app').append( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
olvidaste borrar esto?
No description provided.