You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So i have a json file with all the country codes and i have got it to add it to the menu (see code) however it seems that because am showing every country the list does not want to scroll to the beginning but instead scroll way past the last country
getJSON('/country.json').then(function(data) {
// alert('Your Json result is: ' + data.result); //you can comment this, i used it to debug
//console.log("data: "+data);
for (var p in data) {
var ul = document.getElementById("countrymenu");
var li = document.createElement("li");
li.setAttribute("data-val", p);
li.setAttribute("class", "mdl-menu__item")
li.appendChild(document.createTextNode(data[p]));
ul.appendChild(li);
}
getmdlSelect.init(".getmdl-select");
}, function(status) { //error detection....
alert('Something went wrong.');
});
The text was updated successfully, but these errors were encountered:
So i have a json file with all the country codes and i have got it to add it to the menu (see code) however it seems that because am showing every country the list does not want to scroll to the beginning but instead scroll way past the last country
and javascript
The text was updated successfully, but these errors were encountered: