-
-
-
-
-
-
var jobsearch_sloc_type = '',
jobsearch_is_admin = '',
totl_countries_detail, totl_preselected_states_saved,
jobsearch_is_post_page = 'index.php';
var inc_countries = "", inc_countries_code = "",
exec_countries = "", contry_presel_contry, ajax_flag = false,
contry_preselct = 'none',
contry_presel_contry_code = '';
/*
* Scrapper Events
* */
var api_scrapper6933183 = {
getCountryCode: function (jobsearch_sloc_country) {
var country_code_from_country_name = '';
jQuery.each(totl_countries_detail, function (index, element) {
if (element.country_name == jobsearch_sloc_country) {
country_code_from_country_name = element.country_code;
}
});
return country_code_from_country_name;
},
readCityOnlyFiles: function (country_detail, state_name, selector) {
if (jobsearch_is_admin == '' || ajax_flag == true) {
jQuery('#jobsearch-gdapilocs-citycon6933183').empty();
jQuery('#jobsearch-gdapilocs-citycon6933183').append('');
selector = jQuery(document).find("#cityId6933183");
}
var request = jQuery.ajax({
url: jobsearch_plugin_vars.ajax_url,
method: "POST",
data: {
country_detail: country_detail,
state: state_name,
_nonce: 'b84477e0a1',
action: 'jobsearch_location_load_cities_data',
},
dataType: 'json',
});
request.done(function (response) {
var _result_cities = response;
if (jobsearch_is_admin == '' || ajax_flag == true) {
if (selector.length > 0) {
selector.selectize()[0].selectize.destroy();
}
}
setTimeout(function () {
if(jQuery('.vc_ui-panel-window-inner').find('.jobsearch-vcloc-dropdwn-con').length>0){
selector = jQuery('.location2-city');
}
selector.html('');
//if (jobsearch_is_admin == 1 && ajax_flag == false) {
selector.append('');
// }
var _option_select = '';
if (_result_cities.result.length != 0) {
jQuery.each(_result_cities.result, function (index, element) {
if (jQuery.trim(element.city_name) != "Enter Any City") {
if (jobsearch_sloc_city != "") {
_option_select = jobsearch_sloc_city == element.city_name ? 'selected' : '';
}
if (_option_select != "") {
selector.append(jQuery("").attr("value", element.city_name).attr("selected", "selected").text(element.city_name));
} else {
selector.append(jQuery("").attr("value", element.city_name).text(element.city_name));
}
}
});
} else {
selector.html('');
selector.append(jQuery("").attr("value", "").text('No cities exits.'));
}
}, 50);
if (jobsearch_is_admin == '' || ajax_flag == true) {
if (_result_cities.result.length != 0) {
setTimeout(function () {
selector.selectize({
maxOptions: 30000,
sortField: [{
field: 'text',
direction: 'asc'
}],
});
}, 100);
}
}
jQuery('#cityId6933183').trigger('change');
});
request.fail(function (jqXHR, textStatus) {
});
},
readStateFile: function (country_code, selector) {
var request, _result_states;
if (jobsearch_is_admin == '' || ajax_flag == true) {
jQuery('#jobsearch-gdapilocs-statecon6933183').empty();
jQuery('#jobsearch-gdapilocs-statecon6933183').append('');
selector = jQuery(document).find("#stateId6933183, .location2-states");
}
selector.html('');
request = jQuery.ajax({
url: jobsearch_plugin_vars.ajax_url,
method: "POST",
data: {
country_code: country_code,
_nonce: 'b84477e0a1',
action: 'jobsearch_location_load_states_data',
},
dataType: 'json',
});
if(jQuery('.vc_ui-panel-window-inner').find('.jobsearch-vcloc-dropdwn-con').length>0){
selector = jQuery('.location2-state');
}
request.done(function (response) {
if (jobsearch_is_admin == '' || ajax_flag == true) {
//selector.selectize()[0].selectize.destroy();
}
_result_states = response;
setTimeout(function () {
selector.html('');
//if (jobsearch_is_admin == 1 && ajax_flag == false) {
selector.append('');
//}
var _option_select = '';
jQuery.each(_result_states.result, function (index, element) {
if (jQuery.trim(element.state_name) != "Enter Any State") {
if (jobsearch_sloc_state != "") {
_option_select = jobsearch_sloc_state == element.state_name ? 'selected' : '';
}
if (_option_select != "") {
selector.append(jQuery("").attr("value", element.state_name).attr("selected", "selected").text(element.state_name));
// selector.append(jQuery('").attr("value", element.state_name).text(element.state_name));
// selector.append(jQuery('
/*
* If city is saved then this code will execute.
* */
if (jobsearch_sloc_city != "") {
setTimeout(function () {
console.info("triggered second");
jQuery('#stateId6933183').trigger('change');
}, 1000)
}
/*
* Initialize Selectize
* */
if (jobsearch_is_admin == '' || ajax_flag == true) {
setTimeout(function () {
selector.selectize();
}, 100)
}
});
request.fail(function (jqXHR, textStatus) {
});
},
stripslashes: function (str) {
if (str == undefined) {
return;
}
return str.replace(/\\/g, '');
},
readCountryFile: function (selector, country) {
var _result_countries, request;
request = jQuery.ajax({
url: jobsearch_plugin_vars.ajax_url,
method: "POST",
data: {
_nonce: 'b84477e0a1',
action: 'jobsearch_location_load_countries_data',
},
dataType: "json"
});
request.done(function (response) {
_result_countries = response;
selector.html('');
if (jobsearch_is_admin == 1 && ajax_flag == true) {
selector.append('');
} else {
var $opt = jQuery('")
.attr("data-index", i)
.attr("code", inc_countries_code[i])
.attr("selected", "selected")
.attr("value", inc_countries[i])
.text(inc_countries[i]));
_inc_flag = true;
} else if (contry_preselct == 'by_contry' && contry_presel_contry_code == inc_countries_code[i] && ajax_flag == false && _inc_flag == false) {
selector.append(jQuery("")
.attr("data-index", i)
.attr("code", inc_countries_code[i])
.attr("selected", "selected")
.attr("value", inc_countries[i])
.text(inc_countries[i]));
} else {
selector.append(jQuery("")
.attr("data-index", i)
.attr("code", inc_countries_code[i])
.attr("value", inc_countries[i])
.text(inc_countries[i]));
}
}
})
} else if (exec_countries != '' && jobsearch_is_loc_editor != 'jobsearch-location-sett-editor') {
/*
* code will execute if "Exclude countries selected" filter option will be selected
* */
var _exec_flag = false;
jQuery.each(_result_countries, function (index, element) {
if (element != "") {
if (exec_countries.indexOf(element.name) == -1) {
/*
* code will execute if Country Name is from save in metavalue
* */
if (jobsearch_sloc_country == element.name) {
selector.append(jQuery("")
.attr("data-index", index)
.attr("code", element.code)
.attr("selected", "selected")
.attr("value", element.name)
.text(element.name));
_exec_flag = true;
} else if (contry_preselct == 'by_contry' && contry_presel_contry_code == element.code && ajax_flag == false && _exec_flag == false) {
selector.append(jQuery("")
.attr("data-index", index)
.attr("code", element.code)
.attr("selected", "selected")
.attr("value", element.name)
.text(element.name));
} else {
selector.append(jQuery("")
.attr("data-index", index)
.attr("code", element.code)
.attr("value", element.name)
.text(element.name));
}
}
}
})
} else {
var pres_selected_saved_contry = api_scrapper6933183.getCountryCode(jobsearch_sloc_country);
jQuery.each(_result_countries, function (index, element) {
if (element != "") {
/*
* code will execute if Preselect Country option will be selected
* */
if (jobsearch_sloc_type != 2 && jobsearch_sloc_type != 3) {
var _option_select = '';
if (jobsearch_sloc_country != '') {
if (api_scrapper6933183.stripslashes(jobsearch_sloc_country) == api_scrapper6933183.stripslashes(element.name)) {
selector.append(jQuery("")
.attr("data-index", index)
.attr("code", element.code)
.attr("selected", "selected")
.attr("value", element.name)
.text(api_scrapper6933183.stripslashes(element.name)));
} else {
selector.append(jQuery("")
.attr("data-index", index)
.attr("code", element.code)
.attr("value", element.name)
.text(api_scrapper6933183.stripslashes(element.name)));
}
} else {
selector.append(jQuery("")
.attr("data-index", index)
.attr("code", element.code)
.attr("value", element.name)
.text(api_scrapper6933183.stripslashes(element.name)));
}
} else if (jobsearch_is_loc_editor == 'jobsearch-location-sett-editor') {
selector.append(jQuery("")
.attr("data-index", index)
.attr("code", element.code)
.attr("value", element.name)
.text(api_scrapper6933183.stripslashes(element.name)));
}
}
});
}
/*
* Initialize Selectize
* */
if (jobsearch_is_admin == '' || ajax_flag == true) {
if (jobsearch_sloc_type == 0 || jobsearch_sloc_type == 1) {
selector.selectize({
placeholder: 'Select Country',
});
}
}
});
request.fail(function (jqXHR, textStatus) {
});
},
predictByIP: function () {
var request = jQuery.ajax({
url: "https://ipinfo.io/json",
dataType: "json"
});
request.done(function (result) {
if (result != '') {
api_scrapper6933183.readCountryFile(jQuery('#countryId6933183'), result.country);
} else {
/*
* Second Request will be sent if first request will fail.
* */
api_scrapper6933183.apiSecondRequest();
}
});
request.fail(function (jqXHR, textStatus) {
api_scrapper6933183.apiSecondRequest();
});
},
shuffleArray: function (a) {
var j, x, i;
for (i = a.length - 1; i > 0; i--) {
j = Math.floor(Math.random() * (i + 1));
x = a[i];
a[i] = a[j];
a[j] = x;
}
return a;
},
apiSecondRequest: function () {
var request = jQuery.ajax({
url: "http://ip-api.com/json",
dataType: "json"
});
request.done(function (result) {
api_scrapper6933183.readCountryFile(jQuery('#countryId6933183'), result.countryCode);
api_scrapper6933183.readStateFile(result.countryCode, jQuery('#stateId6933183'))
});
request.fail(function (jqXHR, textStatus) {
});
},
compareStrings: function (a, b) {
a = a.toLowerCase();
b = b.toLowerCase();
return (a < b) ? -1 : (a > b) ? 1 : 0;
},
getBulkCitiesByStates: function (preselected_states, jobsearch_sloc_city) {
jQuery('.cities').html('');
jQuery.ajax({
url: jobsearch_plugin_vars.ajax_url,
method: "POST",
data: {
preselected_states: JSON.parse(preselected_states),
_nonce: 'b84477e0a1',
action: 'jobsearch_get_selected_states_cities',
},
dataType: 'json',
success: function (response) {
jQuery.each(response.all_cities, function (index, city_name) {
if (jobsearch_sloc_city == city_name) {
jQuery('.cities')
.append(jQuery("")
.attr("value", city_name)
.attr("selected", "selected")
.text(city_name));
} else {
jQuery('.cities')
.append(jQuery("")
.attr("value", city_name)
.text(city_name));
}
});
if (jobsearch_is_admin == '' || ajax_flag == true) {
setTimeout(function () {
jQuery('.cities').selectize({
sortField: 'text'
});
}, 100)
}
}
});
}
};
/*
* Scrapper Events end
* */
jQuery(window).on('load', function () {
//
totl_countries_detail = JSON.parse('[{"country_code":"AF","country_name":"Afghanistan"},{"country_code":"AL","country_name":"Albania"},{"country_code":"DZ","country_name":"Algeria"},{"country_code":"AD","country_name":"Andorra"},{"country_code":"AO","country_name":"Angola"},{"country_code":"AI","country_name":"Anguilla"},{"country_code":"AG","country_name":"Antigua and Barbuda"},{"country_code":"AR","country_name":"Argentina"},{"country_code":"AM","country_name":"Armenia"},{"country_code":"AU","country_name":"Australia"},{"country_code":"AT","country_name":"Austria"},{"country_code":"AZ","country_name":"Azerbaijan"},{"country_code":"BS","country_name":"Bahamas"},{"country_code":"BH","country_name":"Bahrain"},{"country_code":"BD","country_name":"Bangladesh"},{"country_code":"BB","country_name":"Barbados"},{"country_code":"BY","country_name":"Belarus"},{"country_code":"BE","country_name":"Belgium"},{"country_code":"BZ","country_name":"Belize"},{"country_code":"BJ","country_name":"Benin"},{"country_code":"BM","country_name":"Bermuda"},{"country_code":"BT","country_name":"Bhutan"},{"country_code":"BO","country_name":"Bolivia"},{"country_code":"BA","country_name":"Bosnia and Herzegovina"},{"country_code":"BW","country_name":"Botswana"},{"country_code":"BR","country_name":"Brazil"},{"country_code":"BN","country_name":"Brunei Darussalam"},{"country_code":"BG","country_name":"Bulgaria"},{"country_code":"BF","country_name":"Burkina Faso"},{"country_code":"BI","country_name":"Burundi"},{"country_code":"KH","country_name":"Cambodia"},{"country_code":"CM","country_name":"Cameroon"},{"country_code":"CA","country_name":"Canada"},{"country_code":"CV","country_name":"Cape Verde"},{"country_code":"KY","country_name":"Cayman Islands"},{"country_code":"CF","country_name":"Central African Republic"},{"country_code":"TD","country_name":"Chad"},{"country_code":"CL","country_name":"Chile"},{"country_code":"CN","country_name":"China"},{"country_code":"CO","country_name":"Colombia"},{"country_code":"KM","country_name":"Comoros"},{"country_code":"CG","country_name":"Congo"},{"country_code":"CR","country_name":"Costa Rica"},{"country_code":"HR","country_name":"Croatia (Hrvatska)"},{"country_code":"CU","country_name":"Cuba"},{"country_code":"CY","country_name":"Cyprus"},{"country_code":"CZ","country_name":"Czech Republic"},{"country_code":"DK","country_name":"Denmark"},{"country_code":"DJ","country_name":"Djibouti"},{"country_code":"DM","country_name":"Dominica"},{"country_code":"DO","country_name":"Dominican Republic"},{"country_code":"EC","country_name":"Ecuador"},{"country_code":"EG","country_name":"Egypt"},{"country_code":"SV","country_name":"El Salvador"},{"country_code":"GQ","country_name":"Equatorial Guinea"},{"country_code":"ER","country_name":"Eritrea"},{"country_code":"EE","country_name":"Estonia"},{"country_code":"ET","country_name":"Ethiopia"},{"country_code":"FO","country_name":"Faroe Islands"},{"country_code":"FJ","country_name":"Fiji"},{"country_code":"FI","country_name":"Finland"},{"country_code":"FR","country_name":"France"},{"country_code":"GF","country_name":"French Guiana"},{"country_code":"PF","country_name":"French Polynesia"},{"country_code":"TF","country_name":"French Southern Territories"},{"country_code":"GA","country_name":"Gabon"},{"country_code":"GM","country_name":"Gambia"},{"country_code":"GE","country_name":"Georgia"},{"country_code":"DE","country_name":"Germany"},{"country_code":"GH","country_name":"Ghana"},{"country_code":"GR","country_name":"Greece"},{"country_code":"GL","country_name":"Greenland"},{"country_code":"GD","country_name":"Grenada"},{"country_code":"GP","country_name":"Guadeloupe"},{"country_code":"GU","country_name":"Guam"},{"country_code":"GT","country_name":"Guatemala"},{"country_code":"GN","country_name":"Guinea"},{"country_code":"GW","country_name":"Guinea-Bissau"},{"country_code":"GY","country_name":"Guyana"},{"country_code":"HT","country_name":"Haiti"},{"country_code":"HN","country_name":"Honduras"},{"country_code":"HK","country_name":"Hong Kong"},{"country_code":"HU","country_name":"Hungary"},{"country_code":"IS","country_name":"Iceland"},{"country_code":"IN","country_name":"India"},{"country_code":"IM","country_name":"Isle of Man"},{"country_code":"ID","country_name":"Indonesia"},{"country_code":"IR","country_name":"Iran"},{"country_code":"IQ","country_name":"Iraq"},{"country_code":"IE","country_name":"Ireland"},{"country_code":"IL","country_name":"Israel"},{"country_code":"IT","country_name":"Italy"},{"country_code":"CI","country_name":"Ivory Coast"},{"country_code":"JE","country_name":"Jersey"},{"country_code":"JM","country_name":"Jamaica"},{"country_code":"JP","country_name":"Japan"},{"country_code":"JO","country_name":"Jordan"},{"country_code":"KZ","country_name":"Kazakhstan"},{"country_code":"KE","country_name":"Kenya"},{"country_code":"KI","country_name":"Kiribati"},{"country_code":"KP","country_name":"North Korea"},{"country_code":"KR","country_name":"South Korea"},{"country_code":"XK","country_name":"Kosovo"},{"country_code":"KW","country_name":"Kuwait"},{"country_code":"KG","country_name":"Kyrgyzstan"},{"country_code":"LA","country_name":"Lao"},{"country_code":"LV","country_name":"Latvia"},{"country_code":"LB","country_name":"Lebanon"},{"country_code":"LS","country_name":"Lesotho"},{"country_code":"LR","country_name":"Liberia"},{"country_code":"LY","country_name":"Libyan Arab Jamahiriya"},{"country_code":"LI","country_name":"Liechtenstein"},{"country_code":"LT","country_name":"Lithuania"},{"country_code":"LU","country_name":"Luxembourg"},{"country_code":"MK","country_name":"Macedonia"},{"country_code":"MG","country_name":"Madagascar"},{"country_code":"MW","country_name":"Malawi"},{"country_code":"MY","country_name":"Malaysia"},{"country_code":"MV","country_name":"Maldives"},{"country_code":"ML","country_name":"Mali"},{"country_code":"MT","country_name":"Malta"},{"country_code":"MH","country_name":"Marshall Islands"},{"country_code":"MQ","country_name":"Martinique"},{"country_code":"MR","country_name":"Mauritania"},{"country_code":"MU","country_name":"Mauritius"},{"country_code":"MX","country_name":"Mexico"},{"country_code":"FM","country_name":"Micronesia, Federated States of"},{"country_code":"MD","country_name":"Moldova"},{"country_code":"MC","country_name":"Monaco"},{"country_code":"MN","country_name":"Mongolia"},{"country_code":"ME","country_name":"Montenegro"},{"country_code":"MS","country_name":"Montserrat"},{"country_code":"MA","country_name":"Morocco"},{"country_code":"MZ","country_name":"Mozambique"},{"country_code":"MM","country_name":"Myanmar"},{"country_code":"NA","country_name":"Namibia"},{"country_code":"NR","country_name":"Nauru"},{"country_code":"NP","country_name":"Nepal"},{"country_code":"NL","country_name":"Netherlands"},{"country_code":"AN","country_name":"Netherlands Antilles"},{"country_code":"NC","country_name":"New Caledonia"},{"country_code":"NZ","country_name":"New Zealand"},{"country_code":"NI","country_name":"Nicaragua"},{"country_code":"NE","country_name":"Niger"},{"country_code":"NG","country_name":"Nigeria"},{"country_code":"MP","country_name":"Northern Mariana Islands"},{"country_code":"NO","country_name":"Norway"},{"country_code":"OM","country_name":"Oman"},{"country_code":"PK","country_name":"Pakistan"},{"country_code":"PW","country_name":"Palau"},{"country_code":"PS","country_name":"Palestine"},{"country_code":"PA","country_name":"Panama"},{"country_code":"PG","country_name":"Papua New Guinea"},{"country_code":"PY","country_name":"Paraguay"},{"country_code":"PE","country_name":"Peru"},{"country_code":"PH","country_name":"Philippines"},{"country_code":"PL","country_name":"Poland"},{"country_code":"PT","country_name":"Portugal"},{"country_code":"PR","country_name":"Puerto Rico"},{"country_code":"QA","country_name":"Qatar"},{"country_code":"RE","country_name":"Reunion"},{"country_code":"RO","country_name":"Romania"},{"country_code":"RU","country_name":"Russian Federation"},{"country_code":"RW","country_name":"Rwanda"},{"country_code":"KN","country_name":"Saint Kitts and Nevis"},{"country_code":"LC","country_name":"Saint Lucia"},{"country_code":"VC","country_name":"Saint Vincent and the Grenadines"},{"country_code":"WS","country_name":"Samoa"},{"country_code":"SM","country_name":"San Marino"},{"country_code":"ST","country_name":"Sao Tome and Principe"},{"country_code":"SA","country_name":"Saudi Arabia"},{"country_code":"SN","country_name":"Senegal"},{"country_code":"RS","country_name":"Serbia"},{"country_code":"SC","country_name":"Seychelles"},{"country_code":"SL","country_name":"Sierra Leone"},{"country_code":"SG","country_name":"Singapore"},{"country_code":"SK","country_name":"Slovakia"},{"country_code":"SI","country_name":"Slovenia"},{"country_code":"SB","country_name":"Solomon Islands"},{"country_code":"SO","country_name":"Somalia"},{"country_code":"ZA","country_name":"South Africa"},{"country_code":"ES","country_name":"Spain"},{"country_code":"LK","country_name":"Sri Lanka"},{"country_code":"SH","country_name":"St. Helena"},{"country_code":"PM","country_name":"St. Pierre and Miquelon"},{"country_code":"SD","country_name":"Sudan"},{"country_code":"SR","country_name":"Suriname"},{"country_code":"SJ","country_name":"Svalbard and Jan Mayen Islands"},{"country_code":"SZ","country_name":"Swaziland"},{"country_code":"SE","country_name":"Sweden"},{"country_code":"CH","country_name":"Switzerland"},{"country_code":"SY","country_name":"Syrian Arab Republic"},{"country_code":"TW","country_name":"Taiwan"},{"country_code":"TJ","country_name":"Tajikistan"},{"country_code":"TZ","country_name":"Tanzania"},{"country_code":"TH","country_name":"Thailand"},{"country_code":"TG","country_name":"Togo"},{"country_code":"TK","country_name":"Tokelau"},{"country_code":"TO","country_name":"Tonga"},{"country_code":"TT","country_name":"Trinidad and Tobago"},{"country_code":"TN","country_name":"Tunisia"},{"country_code":"TR","country_name":"Turkey"},{"country_code":"TM","country_name":"Turkmenistan"},{"country_code":"TV","country_name":"Tuvalu"},{"country_code":"UG","country_name":"Uganda"},{"country_code":"UA","country_name":"Ukraine"},{"country_code":"AE","country_name":"United Arab Emirates"},{"country_code":"GB","country_name":"United Kingdom"},{"country_code":"US","country_name":"United States"},{"country_code":"UM","country_name":"United States minor outlying islands"},{"country_code":"UY","country_name":"Uruguay"},{"country_code":"UZ","country_name":"Uzbekistan"},{"country_code":"VU","country_name":"Vanuatu"},{"country_code":"VE","country_name":"Venezuela"},{"country_code":"VN","country_name":"Vietnam"},{"country_code":"VI","country_name":"Virgin Islands (U.S.)"},{"country_code":"WF","country_name":"Wallis and Futuna Islands"},{"country_code":"YE","country_name":"Yemen"},{"country_code":"ZM","country_name":"Zambia"},{"country_code":"ZW","country_name":"Zimbabwe"}]');
totl_preselected_states_saved = '""';
var _single_country_code = '';
if (jobsearch_sloc_type == '2' || jobsearch_sloc_type == '3') {
_single_country_code = jQuery("#countryId6933183").val();
} else {
if (jobsearch_sloc_country != 0 && contry_preselct != 'by_contry') {
_single_country_code = api_scrapper6933183.getCountryCode(jobsearch_sloc_country);
}
}
/*
* If location type is single country (cities)
* */
if (jobsearch_sloc_type == 4) {
api_scrapper6933183.getBulkCitiesByStates(totl_preselected_states_saved, jobsearch_sloc_city);
}
api_scrapper6933183.readCountryFile(jQuery('#countryId6933183'), '');
if (jobsearch_sloc_state != "") {
api_scrapper6933183.readStateFile(_single_country_code, jQuery("#stateId6933183"))
}
if ((jobsearch_sloc_type == 2 || jobsearch_sloc_type == 3) && jobsearch_is_loc_editor != 'jobsearch-location-sett-editor') {
if (_single_country_code != "") {
api_scrapper6933183.readStateFile(_single_country_code, jQuery("#stateId6933183"))
}
if (jobsearch_sloc_city != "") {
setTimeout(function () {
console.info("done first");
jQuery('#stateId6933183').trigger('change');
}, 4000);
}
}
/*
* Pre select Country
* */
});
/*
*countries change event
**/
jQuery(document).on('change', '#countryId6933183', function () {
var _this = jQuery(this);
//console.log(_this.val());
if (_this.val() != 0 && _this.val() != undefined) {
var _country_code = '';
if (inc_countries != "") {
_country_code = api_scrapper6933183.getCountryCode(_this.val());
} else {
_country_code = jobsearch_is_admin == 1 && _this.find('option:selected').attr("code") != undefined ? _this.find('option:selected').attr("code") : api_scrapper6933183.getCountryCode(_this.val());
}
api_scrapper6933183.readStateFile(_country_code, jQuery("#stateId6933183"));
}
});
/*
* state change event
* */
jQuery(document).on('change', '#stateId6933183', function () {
var _this = jQuery(this), _single_country_detail;
if (jobsearch_sloc_type == 1) {
_single_country_detail = jQuery("#countryId6933183").find('option:selected').val();
} else if (jobsearch_sloc_type == '2' || jobsearch_sloc_type == '3') {
_single_country_detail = jQuery("#countryId6933183").val();
} else {
if (jobsearch_sloc_country != 0 && contry_preselct != 'by_contry') {
_single_country_detail = api_scrapper6933183.getCountryCode(jobsearch_sloc_country);
}
}
if (_this.val() != 0 && _this.val() != undefined) {
if(jQuery('.vc_ui-panel-window-inner').find('.jobsearch-vcloc-dropdwn-con').length>0){
_single_country_detail = jQuery(".location2-countries").val();
}
api_scrapper6933183.readCityOnlyFiles(_single_country_detail, _this.val(), jQuery('#cityId6933183'));
}
});
-
-
-