Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ValeOlivares
Copy link

No description provided.

});
}

function showBooks() {
Copy link

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() {
Copy link

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(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

olvidaste borrar esto?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants