var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); /* * LaraClassifier - Classified Ads Web Application * Copyright (c) BeDigit. All Rights Reserved * * Website: https://laraclassifier.com * * LICENSE * ------- * This software is furnished under a license and may be used and copied * only in accordance with the terms of such license and with the inclusion * of the above copyright notice. If you Purchased from CodeCanyon, * Please read the full License from here - http://codecanyon.net/licenses/standard */ if (typeof loadingWd === 'undefined') { var loadingWd = 'Loading...'; } $(document).ready(function () { if (modalDefaultAdminCode !== 0 && modalDefaultAdminCode !== '') { changeCity(countryCode, modalDefaultAdminCode); } $('#modalAdminField').change(function () { changeCity(countryCode, $(this).val()); }); }); function changeCity(countryCode, modalDefaultAdminCode) { /* Check required variables */ if (typeof languageCode === 'undefined' || typeof countryCode === 'undefined' || typeof modalDefaultAdminCode === 'undefined') { return false; } let url = siteUrl + '/ajax/countries/' + strToLower(countryCode) + '/admin1/cities'; let adminCitiesEl = $('#adminCities'); let ajax = $.ajax({ method: 'POST', url: url, data: { 'languageCode': languageCode, 'adminCode': modalDefaultAdminCode, 'currSearch': $('#currSearch').val(), '_token': $('input[name=_token]').val() }, beforeSend: function() { let spinner = '