Houses for sale in Estepona (2024)

Your search

"); $("#searchForm").trigger('submit'); }else{ // If not has forceSubmit, then, a button appears $(".searchSidebar__top").addClass("searchSidebar__top--submitBtn"); }}function toggleForm(){ $(".searchEngine__filters").toggleClass("-active-");}Url = { get get(){ var vars= {}; if(window.location.search.length!==0) window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value){ key=decodeURIComponent(key); if(typeof vars[key]==="undefined") {vars[key]= decodeURIComponent(value);} else {vars[key]= [].concat(vars[key], decodeURIComponent(value));} }); return vars; }};$(document).ready(function(){ /* ONLOAD */ $(window).load(function () { $('main').animate({opacity: "1"}, 500); }); /* HANDLERS */ // VIEW switcher var all_view_option = $(".fn-viewsSwitch input"), property_block_parent = $(".propertyBlock").closest('.searchEngine'); property_block_others = $(".searchEngine__results--others .propertiesList"); // property_block_parent = $(".propertyBlock").closest('.propertiesList'); all_view_option.each(function(){ var view_option = $(this); view_option.on('change',function(){ o = $(this); // Set & apply view view = o.val(); document.cookie="view="+view; property_block_parent.removeClass("listado fotos"); property_block_others.removeClass("listado fotos"); property_block_parent.addClass(view); property_block_others.addClass(view); $('.searchEngine__filters').removeClass('-active-'); $('.fotos .searchEngine__filters').css('transition', 'none'); }); }); $(".openFiltersBtn, .searchSidebar .js-filters, .back-btn").click(function(){ $(".searchEngine__filters").toggleClass("-active-"); }); /*--- searchMain__sort - order search dropdown ---*/ // ORDER BY $('#ob_select').on('change',function(){ var o = $(this); if($('#ob_hidden').length > 0){ $('#ob_hidden').val(o.val()); $('#ob_hidden').change(); } }); // orderby - Mobile /* open/close */ $('.js-sortTitle').bind('click', function(e){ if( $('.js-sortList').is(':hidden') ){ $('.js-sortList').slideDown(); e.stopPropagation(); }else{ $('.js-sortList').slideUp(); } }); /* close on click away */ $(document).on('click', function(e){ var container = $('.js-sortList'); if (!container.is(e.target) && container.has(e.target).length === 0){ container.slideUp(); } }); /* update order on select */ $('.js-sortList > div').click(function(){ $("#ob_hidden").val($(this).data("order")); $("#searchForm").submit(); }); // PRICE - range $("[data-check-range]").each(function(){ $(this).data('pre',$(this).val()); }); // Check if range inputs correspond among themselves function checkRangeSelect(o){ var dataCheckRange = o.data('check-range'); if(typeof dataCheckRange !== typeof undefined && dataCheckRange !== false){ var parent = o.closest('.fn-check-range'), o_pre_val = parseInt(o.data('pre')), o_min_val = parseInt($("[data-check-range='min']",parent).val()), o_max_val = parseInt($("[data-check-range='max']",parent).val()); if(o_min_val == 0 || o_max_val == 0){ return true; }else if(o_min_val > o_max_val){ o.val(o_pre_val); o.change(); return false; }else if(o_min_val != 0 && o_max_val != 0 && o_min_val == o_max_val){ return false; }else{ return true; } }else{ return true; } } // PRICE FROM - select $('[name="pf"]').on('change', function(){ var price_from_value = $(this).children(":selected").val(); /* Adjust search-surface-to options based on selected */ $('[name="pt"]').children("option").show(); $('[name="pt"]').children("option").each(function(){ var option = $(this); if((parseInt(option.val()) <= parseInt(price_from_value))){ option.hide(); } }); //searchSubmit($(this)); $('[name="pt"]').trigger("chosen:updated"); }); // PRICE TO - select $('[name="pt"]').on('change', function(){ var price_to_value = $(this).children(":selected").val(); /* Adjust search-surface-to options based on selected */ $('[name="pf"]').children("option").show(); $('[name="pf"]').children("option").each(function(){ var option = $(this); if((parseInt(option.val()) >= parseInt(price_to_value))){ option.hide(); } }); //searchSubmit($(this)); $('[name="pf"]').trigger("chosen:updated"); }); // SURFACE FROM - select $('[name="sf"]').on('change', function(){ var surface_from_value = $(this).children(":selected").val(); /* Adjust search-surface-to options based on selected */ $('[name="st"]').children("option").show(); $('[name="st"]').children("option").each(function(){ var option = $(this); if((parseInt(option.val()) <= parseInt(surface_from_value))){ option.hide(); } }); //searchSubmit($(this)); $('[name="st"]').trigger("chosen:updated"); }); // SURFACE TO - select $('[name="st"]').on('change', function(){ var surface_to_value = $(this).children(":selected").val(); /* Adjust search-surface-to options based on selected */ $('[name="sf"]').children("option").show(); $('[name="sf"]').children("option").each(function(){ var option = $(this); if((parseInt(option.val()) >= parseInt(surface_to_value))){ option.hide(); } }); //searchSubmit($(this)); $('[name="sf"]').trigger("chosen:updated"); }); /* APPLYING CHOSEN */ // Apply 'chosen' style to selects $(".fn-chosen").each(function(){ var o = $(this); o.chosen({ disable_search: true, no_results_text: "No results", width: '100%' }); o.on('chosen:showing_dropdown', function() { o.next('.chosen-container').children('.chosen-drop').slideDown(200); }); o.on('chosen:hiding_dropdown', function () { o.next('.chosen-container').children('.chosen-drop').slideUp(200); }); }); // Has to be placed BEFORE fn-refreshForm handler $('.filters__typesInput').change(function(){ var o = $(this); // All types checked if(o.hasClass('filters__typesInput--alltypes') && o.is(':checked')){ $('.filters__typesInput').not(this).prop('checked',''); } // Other types checked if(!o.hasClass('filters__typesInput--alltypes') && o.is(':checked')){ $('.filters__typesInput--alltypes').prop('checked',''); } }); // To check if there are group types selector if($(".fn-searchtypegroup").length){ $('.fn-searchtypegroup + .chosen-container, .fn-searchtypegroup').on('change', function(e){ typegroup = $(this); searchTypeGroupUpdate(typegroup); }); } $('.filters__checklistOption label').click(function(){ o = $(this); el_for_attr = o.attr('for'); el = $('i', o); if(el_for_attr.indexOf("all") >= 0 ){ $('.filters__checklistOption label:not([for^="all_"]) i').removeClass('fa-check-square').addClass('fa-square-o'); } el.toggleClass('fa-check-square fa-square-o'); }); // Advanced search toggle Open/Close $('.fn-toggleAdvancedSearch').click(function(e){ e.preventDefault(); $('.filters__advancedFilters').slideToggle(); }); if($('#searchForm').length > 0){ // var reset_multiple_ar = "

  • All
  • ", var reset_multiple_zn = "", reset_custom_zn = reset_multiple_zn, reset_select_zn = "

    ", reset_multiple_ar = "", reset_custom_ar = reset_multiple_ar, reset_select_ar = "

    ", reset_multiple_lc = "

  • All
  • ", reset_custom_lc = reset_multiple_lc, reset_select_lc = "

    ", reset_multiple_dg = "", reset_custom_dg = reset_multiple_dg, reset_select_dg = "", reset_select_ds = "

    ", reset_multiple_ds = "

  • All
  • ", reset_custom_ds = reset_multiple_ds; $('#searchForm').each(function(){ var form = $(this), filters = form, mode_selector = $('.filters__mode .filters__selector',filters), mode_input = $('[name=o]',filters), // input or select mode = $('.filters__mode',filters), grouptypes_input = $('[name=gt]',filters), // input or select grouptypes = $('.filters__grouptypes',filters), type_input = $('[name^=t]',filters),// input or select zone_selector = $('.filters__zone .filters__selector',filters), area_selector = $('.filters__area .filters__selector',filters), location_selector = $('.filters__location .filters__selector',filters), district_selector = $('.filters__district .filters__selector',filters), zone_selector_sale = $('.sitGroup .filters__zone .filters__selector',filters), area_selector_sale = $('.sitGroup .filters__area .filters__selector',filters), location_selector_sale = $('.sitGroup .filters__location .filters__selector',filters), district_selector_sale = $('.sitGroup .filters__district .filters__selector',filters), zone_selector_rental = $('.sitGroupRental .filters__zone .filters__selector',filters), area_selector_rental = $('.sitGroupRental .filters__area .filters__selector',filters), location_selector_rental = $('.sitGroupRental .filters__location .filters__selector',filters), district_selector_rental = $('.sitGroupRental .filters__district .filters__selector',filters), zn_input = $('[name=z]',filters), // input or select ar_input = $('[name=a]',filters), // input or select lc_input = $('[name=l]',filters), // input or select ds_input = $('[name=d]',filters), // input or select zn_input_sale = $('.sitGroup [name=z]',filters), // input or select ar_input_sale = $('.sitGroup [name=a]',filters), // input or select lc_input_sale = $('.sitGroup [name=l]',filters), // input or select ds_input_sale = $('.sitGroup [name=d]',filters), // input or select zn_input_rental = $('.sitGroupRental [name=z]',filters), // input or select ar_input_rental = $('.sitGroupRental [name=a]',filters), // input or select lc_input_rental = $('.sitGroupRental [name=l]',filters), // input or select ds_input_rental = $('.sitGroupRental [name=d]',filters), // input or select district = $('.filters__district',filters), // district input or select location = $('.filters__location',filters), // location input or select area = $('.filters__area',filters), // area input or select area_options = $('.filter__option',area), // all area select options zone = $('.filters__zone',filters), // zone input or select zone_options = $('.filter__option',zone), // all zone select options district_sale = $('.sitGroup .filters__district',filters), // district input or select location_sale = $('.sitGroup .filters__location',filters), // location input or select area_sale = $('.sitGroup .filters__area',filters), // area input or select area_options_sale = $('.sitGroup .filter__option',area), // all area select options zone_sale = $('.sitGroup .filters__area',filters), // area input or select zone_options_sale = $('.sitGroup .filter__option',zone), // all zone select options district_rental = $('.sitGroupRental .filters__district',filters), // district input or select location_rental = $('.sitGroupRental .filters__location',filters), // location input or select area_rental = $('.sitGroupRental .filters__area',filters), // area input or select area_options_rental = $('.sitGroupRental .filter__option',area), // all area select options zone_rental = $('.sitGroupRental .filters__zone',filters), // zone input or select zone_options_rental = $('.sitGroupRental .filter__option',zone); // all zone select options // Delete inputs when is not the found mode form.on('submit',function(){ if($('[name="o"]:checked').val() == 'sale'){ $('.sitGroupRental [name="z"], .sitGroupRental [name="a"], .sitGroupRental [name="l"], .sitGroupRental [name="g"], .sitGroupRental [name="d"], .sitGroupRental [name="q"]').remove(); }else{//rental $('.sitGroup [name="z"], .sitGroup [name="a"], .sitGroup [name="l"], .sitGroup [name="g"], .sitGroup [name="d"], .sitGroup [name="q"]').remove(); } }); // PRICES HANDLERS $('[name="o"]', form).on('change', function(){ var form_mode = $(this); $('[name="pf"] option:not(:first-child), [name="pt"] option:not(:first-child)').remove(); if(form_mode.val() == 'sale'){ $('[name="pf"]').append(html_price_sale); $('[name="pt"]').append(html_price_sale); }else{ $('[name="pf"]').append(html_price_rent); $('[name="pt"]').append(html_price_rent); } }); // MODE HANDLERS var first_time_flag = false; mode_input.on('change',function(){ if($(mode_input.selector + ':checked').val() == 'sale' || $('select' + mode_input.selector).val() == 'sale'){ isRental = 0;json_zones_object = json_zones_sale_object;json_areas_object = json_areas_sale_object;json_locations_object = json_locations_sale_object;json_districts_object = json_districts_sale_object;}else{ isRental = 1;json_zones_object = json_zones_rental_object;json_areas_object = json_areas_rental_object;json_locations_object = json_locations_rental_object;json_districts_object = json_districts_rental_object;} // Only in homepage and search if($('.sitGroup').length || $('.sitGroupRental').length){ if(isRental == 1){ zone = zone_rental; zone_selector = zone_selector_rental; zn_input = zn_input_rental; area = area_rental; area_selector = area_selector_rental; ar_input = ar_input_rental; location_selector = location_selector_rental; lc_input = lc_input_rental; district_selector = district_selector_rental; ds_input = ds_input_rental; }else{ zone = zone_sale; zone_selector = zone_selector_sale; zn_input = zn_input_sale; area = area_sale; area_selector = area_selector_sale; ar_input = ar_input_sale; location_selector = location_selector_sale; lc_input = lc_input_sale; district_selector = district_selector_sale; ds_input = ds_input_sale; } } //Search is horizontal || dynamic search && (isMobile || not on page load) if(isMobile || !first_time_flag){ first_time_flag = true; let _anyZoneSelected = false; let _anyAreaSelected = false; let _anyLocationSelected = false; let _anyDistrictSelected = false; // ZONAS html = reset_custom_zn; html = ""; $.each(json_zones_object,function(key, obj){ //if($('#searches').hasClass('searchHorz') && current_zone != obj.zone_id ) { return;} let _isZoneSelected = (current_zone == obj.zone_id) ? ' selected' : ''; if(_isZoneSelected != ''){ _anyZoneSelected = true; } html += "

  • "+obj.title+"
  • ";}); // Draw areas in the areas box zone_selector.html(html); if(_anyZoneSelected){ //$('li:not(:only-child):first-child', zone_selector).removeClass('selected'); //$('option:not(:only-child):first-child', zone_selector).prop('selected', false); }else{ $('li:first-child', zone_selector).click(); $('option:first-child', zone_selector).prop('selected', true).change(); current_zone = 1; } zone.trigger("chosen:updated"); zone_selector.trigger("chosen:updated"); // AREAShtml = reset_custom_ar;$.each(json_areas_object,function(key, obj){ $.each(json_zones_object,function(keyZone, objZone){ if(current_zone == objZone.zone_id){ let _isAreaSelected = (current_area == obj.area_id) ? ' selected' : ''; if(_isAreaSelected != ''){ _anyAreaSelected = true; } if(obj.zone_id == objZone.zone_id) { html += "

  • " + obj.title + "
  • "; } } }); });// Draw this area in the area boxarea_selector.html(html);if(_anyAreaSelected){ $('li:not(:only-child):first-child', area_selector).removeClass('selected'); $('option:not(:only-child):first-child', area_selector).prop('selected', false);}area.trigger("chosen:updated");// LOCATIONShtml = reset_custom_lc;$.each(json_locations_object,function(key, obj){$.each(json_areas_object,function(keyArea, objArea){ if(current_area == objArea.area_id){let _isLocationSelected = (current_location == obj.location_id) ? ' selected' : ''; if(_isLocationSelected != ''){ _anyLocationSelected = true; }if(obj.area_id == objArea.area_id){html += "

  • " + obj.title + "
  • ";} } });});// Draw this area locations in the locations boxlocation_selector.html(html);if(_anyLocationSelected){$('li:not(:only-child):first-child', location_selector).removeClass('selected');$('option:not(:only-child):first-child', location_selector).prop('selected', false);}location.trigger("chosen:updated");html = reset_custom_ds;// groups by area// groups by location $.each(json_districts_object,function(key, obj){ $.each(json_locations_object,function(keyLocation, objLocation){ if(current_location == objLocation.location_id){ let _isDistrictSelected = (current_district == obj.district_id) ? ' selected' : ''; if(_isDistrictSelected != ''){ _anyDistrictSelected = true; } if(obj.location_id == objLocation.location_id) { html += "

  • " + obj.title + "
  • "; } } }); }); /* let _isDistrictSelected = ''; let districtInSearch = current_district.indexOf(json_districts_object[key].district_id); if(districtInSearch != -1){ _isDistrictSelected = ' selected'; } if(_isDistrictSelected != ''){ _anyDistrictSelected = true; } if(json_districts_object[key].location_id == json_locations_object[keyLocation].location_id) { html += "

  • " + json_districts_object[key].title + "
  • "; } } }); });*/ // Draw this area locations in the locations box district_selector.html(html); if(_anyDistrictSelected){ $('li:not(:only-child):first-child', district_selector).removeClass('selected'); $('option:not(:only-child):first-child', district_selector).prop('selected', false); } district.trigger("chosen:updated"); } }); district_selector_container = $('ul',district_selector); // Handler to close districts selector when clicked outside $('body').click(function(e){ var $tgt = $(e.target); if (!$tgt.closest(".customSelect__drop").length){ if(district_selector_container.is(':visible')){ district_selector.removeClass('customSelect--open'); } } }); // Open / Close custom multi-option districts selector $('>a',district_selector).on('click',function(e){ e.preventDefault(); e.stopPropagation(); district_selector.toggleClass('customSelect--open'); }); // Multiple selection district handler district.on('click', '.filter__option, .filters__checklistOption',function(){ ds_input_value = ds_input.val(); district_option_id = $(this).data('district'); if(district_option_id != ''){ if(ds_input_value == ''){ $('.filter__option',district_selector_container).removeClass('selected'); } $(this).toggleClass('selected'); // If district is currently selected (In the input value), remove in it, else add it. ds_input_value = ',' + ds_input_value; if(ds_input_value.indexOf(',' + district_option_id) >= 0){ new_ds_input_value = ds_input_value + ','; new_ds_input_value = new_ds_input_value.replace(district_option_id + ',',''); new_ds_input_value_trim_comma = new_ds_input_value.substring(0,new_ds_input_value.lastIndexOf(",")); new_ds_input_value_trim_comma = new_ds_input_value_trim_comma.substr(1); ds_input.val(new_ds_input_value_trim_comma); }else{ //if(ds_input_value != ''){ds_input_value = ds_input_value + ',';} new_ds_input_value = district_option_id + ds_input_value; // Remove last comma //new_ds_input_value_trim_comma = new_ds_input_value.substring(0,new_ds_input_value.lastIndexOf(",")); ds_input.val(new_ds_input_value); }}else{ if(ds_input_value == '' && $(this).hasClass('selected')){ $('.filter__option',district_selector_container).removeClass('selected'); }else{ $('.filter__option',district_selector_container).addClass('selected'); } ds_input.val(''); } searchSubmit('forceSubmit', $(this)); }); // Common location selector handler location_selector.on('change',function(){ //Use districts from sale or rental if($(':checked', mode_input).val() == 'sale' || mode_input.val() == 'sale'){ json_districts_object = json_districts_sale_object; }else{//rental json_districts_object = json_districts_rental_object; } district_selector_container.html(reset_multiple_ds); location_option_id = $(this).val(); //lc_input.val(location_option_id); ds_input.val(''); html = reset_multiple_ds; $.each(json_districts_object,function(key, obj){ if(obj.location_id == location_option_id){ html += "

  • "+obj.title+"
  • "; } }); // Draw this area locations in the locations box district_selector_container.html(html); district_selector_container.trigger("chosen:updated"); }); // Common area selector handler area_selector.on('change',function(){ //Use locations from sale or rental if($(':checked', mode_input).val() == 'sale' || mode_input.val() == 'sale'){ json_locations_object = json_locations_sale_object; json_districts_object = json_districts_sale_object; }else{//rental json_locations_object = json_locations_rental_object; json_districts_object = json_districts_rental_object; } location_selector.html(reset_multiple_lc); district_selector_container.html(reset_select_ds); area_option_id = $(this).val(); lc_input.val(''); ds_input.val(''); if(false){ //TODO: If there are some group, do this /* counter = 0; $.each(json_groups_object,function(key){ loc_id = json_groups_object[key].location_id; $.each(json_locations_object,function(key2){ var totalCount = json_locations_object[key2].properties.rental + json_locations_object[key2].properties.sale; //count total properties per location, so that we can leave out locations that have no property if(totalCount !== 0){ if(loc_id == key2) { if(json_locations_object[key2].area_id == area_str) { var totalGroupsCount = json_groups_object[key].properties.sale + json_groups_object[key].properties.rental; if(totalGroupsCount > 0){ counter++; html += '

  • '+json_groups_object[key].title+'
  • '; } } } } }); }); */ }else{ html = reset_select_lc; $.each(json_locations_object,function(key, obj){ if(obj.area_id == area_option_id){ districts_ids= ""; $.each(json_districts_object,function(key2, objDistricts){ if(key == objDistricts.location_id) { districts_ids += key2 + ','; } }); html += "

    "; } }); // Draw this area locations in the locations box location_selector.html(html).trigger("chosen:updated"); } district_selector.trigger("chosen:updated"); }); // Common zone selector handler zone_selector.on('change',function(){ //Use areas from sale or rental if($(':checked', mode_input).val() == 'sale' || mode_input.val() == 'sale'){ json_areas_object = json_areas_sale_object; json_locations_object = json_locations_sale_object; json_districts_object = json_districts_sale_object; }else{//rental json_areas_object = json_areas_rental_object; json_locations_object = json_locations_rental_object; json_districts_object = json_districts_rental_object; }area_selector.html(reset_multiple_ar);location_selector.html(reset_select_lc); // Poner igual que ds¿?¿?¿?district_selector_container.html(reset_select_ds);zone_option_id = $(this).val();ar_input.val('');lc_input.val('');ds_input.val('');reset_select_dg = "

    ";html = reset_select_ar; $.each(json_areas_object,function(key, obj){ if(obj.zone_id == zone_option_id){ locations_ids= ""; $.each(json_locations_object,function(key2, objLocations){ if(key == objLocations.area_id) { locations_ids += key2 + ','; } }); html += "

    "; } });// Draw this area locations in the locations boxarea_selector.html(html).trigger("chosen:updated");location_selector.trigger("chosen:updated");district_selector.trigger("chosen:updated");}); }); } if($('.fn-refreshForm').length > 0){// Submit form on change - If is set as true $('.fn-refreshForm').on('change', function(){ // For bedrooms and bathrooms, uncheck all options and allow to native check if($(this).parents('.filters__bedroomsOption').length || $(this).parents('.filters__bathroomOption').length){ $('[name="'+ $(this).attr('name') +'"]').not(this).prop('checked', false); } if(!checkRangeSelect($(this))) return false; mobile_force = ""; if($('.searchEngine').hasClass('fotos') && !$(this).is("#ob_hidden")){ $(this).closest('form').append(' '); } searchSubmit(mobile_force, $(this)); });} // Always submit form on change $('.fn-refreshFormMob').on('change', function(){ // Check if selected value is correct acording another select. if not, stop change event. if(!checkRangeSelect($(this))) return false; searchSubmit('forceSubmit', $(this)); }); // Always submit form on click $('.fn-submitSearchSidebar').on('click', function(){ searchSubmit('forceSubmit', $(this)); }); // Scroll to selected element if exists $('.filter--multiple .select-box').each(function(){ var self = $(this); var first_selected_option = $('.filter__option.selected', self).first(); if(first_selected_option.length > 0){ self.scrollTop(self.scrollTop() + first_selected_option.position().top); } }); /*--- Fotos view search sidebar ---*/ //Remove '&ref=filter' from urlfunction removeRefFilter(){var url = $(location).attr('href').replace('&ref=filter', '');window.history.replaceState({page: '1'}, document.title, url);}//close sidebar if click outside of it$(document).on('click',function(o) {if($('.searchEngine__filters').hasClass('-active-') && !$(o.target).hasClass('fn-searchFilters') && !$(o.target).closest(".searchEngine__filters.-active-").length){$('.searchEngine__filters').removeClass('-active-');removeRefFilter();}});//open/close sidebar$('.fn-searchFilters').on('click', function(){$('.fotos .searchEngine__filters').css('transition', '0.2s all');$('.searchEngine__filters').toggleClass('-active-');if(!$('.searchEngine__filters').hasClass('-active-')){removeRefFilter();}}); });

    Houses for sale in Estepona (2024)
    Top Articles
    Latest Posts
    Article information

    Author: Gregorio Kreiger

    Last Updated:

    Views: 6401

    Rating: 4.7 / 5 (57 voted)

    Reviews: 88% of readers found this page helpful

    Author information

    Name: Gregorio Kreiger

    Birthday: 1994-12-18

    Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

    Phone: +9014805370218

    Job: Customer Designer

    Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

    Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.