For iOS devices in an array active class will not be selected so the selected option will show only the first option of the array using this Methode we can select the active option from the array
the selected values are taking in IOS devices also the issues on the iOS devices are due to the difference in the value of the selected location we got to set as the current location on the website.
For iOS devices, we got only the first word of the selected location. We didn’t get the complete name of the location.
The selected location will be set as the current location of the website based on the name of the selected location. Since the name does not match on the iOS devices, it will not be set for those devices.
So, I have updated the extension to set the location for all devices.
.done(function(result) {
console.log(“result”, result);
console.log(“self”, self);
_.each(self.loc, function(each) {
console.log(“each”, each);
if (each.text2 == result.selectedvalue)
each.activeClass = 'selected'
else
each.activeClass = '';
})
console.log("self2", self);
promise.resolve();
$('#locationheader').val(result.selectedvalue)
console.log("$('#locationheader').val()", $('#locationheader').val());
location.reload()
})