I have this code:
$('#from_country').change(function () {
var selected_from = $(this).find('option:selected');
var country = roaming_prices_from(selected_from.val(), function () {
console.log(country);
});
How can I use the return value of roaming_prices_from inside of its own callback function?
roaming_prices_from. You must change this function, or don't use the function as callback (i.e.callback(roaming_prices_from(selected_from.val()));)countryto callback method when invoking it fromroaming_prices_frommethod?var country = roaming_prices_from(selected_from.val(), function (country) { console.log(country); });? This dosnt seem to work, but if this is correct. Then I might have a fault somewhere else.