javascript for grabbing attribute from element/use in planner app
Sat Oct 24 2020 17:54:17 GMT+0000 (Coordinated Universal Time)
Saved by
@jlang
#javascript
var buttonClickHandler = function (event) {
// What is `event.target` referencing?
// TODO: Write your answer here
var language = event.target.getAttribute('data-language');
//event target uses get attribute from the
// Why is this `if` block in place?
// TODO: Write your answer here
if (language) {
getFeaturedRepos(language);
repoContainerEl.textContent = '';
}
};
content_copyCOPY
Comments