Hi,
How would you get an api to fire not when the page loads but when the dropdown form element (including its little downward arrow) is clicked on?
My current working script is
Thanks in advance
- <script>
var blah= $('#BlahID');
var blah_api_url = 'https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
jQuery.get(blah_api_url, function (data) {
$(data).each(function (key, val) {
console.log(key);
blah($("<option>").attr('value', val[0]).text(val[1]));
});
}, 'json');
- </script>