";
html+="
"+this.pub_name+"
";
html+="
";
});
$.each(results.geo_data, function() {
var geoPath=this.region_name.replace(/-/g, " ")+"-"+this.county_name.replace(/-/g, " ");
if(this.town_name!="")geoPath+="-"+this.town_name.replace(/-/g, " ");
geoPath=geoPath.replace(/ /g, "+");
geoPath=encodeURI(geoPath);
html+="
";
html+="
";
if(this.town_name!="") {
html+="
"+this.town_name+"
";
}
html+="
"+this.county_name+"
";
html+="
"+this.town_name+" - "+this.county_name+"
";
html+="
";
});
$(".location_search_results_div").html(html).show();
$(".location_search_result_item").off().on("click", function() {
$("#location_search_1731799317").hide();
var html="
";
html+=$(this).html();
html+="
";
$(".location_search_input_result_div").remove();
$(".location_search_input_div").append(html);
$(".location_search_results_div").hide();
$(".location_search_input_result_div").off().on("click", function() {
$(".location_search_input_result_div").remove();
$("#location_search_1731799317").show();
$("#location_search_1731799317").focus();
$(".location_search_results_div").show();
});
});
}
});
}
});
});
function update_selected_area(){
var selected_county = $('#county_select').val();
$.ajax({
type: "POST",
url: '/ajax_functions.php?function=get_areas',
data: {selected_county:selected_county},
success: function(msg){
var results = JSON.parse(msg);
if(results.login){
window.location.href=results.link;
}
if(results.html){
$('.area_search_selected_container').html(results.html);
$('select').material_select();
}
}
});
}
function toggle_notice_search_cont(){
$('.search_notice_container').slideDown();
$('.toggle_notice_search_cont').hide();
}