var breeze_prefetch = {"local_url":"https://rayarivera.com","ignore_remote_prefetch":"1","ignore_list":["wp-admin","wp-login.php"]};
//# sourceURL=breeze-prefetch-js-extra
https://rayarivera.com/wp-content/plugins/breeze/assets/js/js-front-end/breeze-prefetch-links.min.js
var rrFormNonce = "07b8ad7509";
//# sourceURL=jquery-js-before
https://rayarivera.com/wp-content/plugins/mlsimport/public/js/mlsimport-public.js
document.documentElement.className += " spai_has_js";
(function(w, d){
var b = d.getElementsByTagName('head')[0];
var s = d.createElement("script");
var v = ("IntersectionObserver" in w) ? "" : "-compat";
s.async = true; // This includes the script as async.
s.src = "https://cdn.shortpixel.ai/assets/js/bundles/spai-lib-bg" + v
+ ".1.1.min.js?v=3.11.2";
w.spaiDomain = "cdn.shortpixel.ai";
w.spaiData = {
version: "3.11.2",
key: "spai",
customKeys: [],
quality: "lossy",
convert: "webp",
lqip: false,
rootMargin: "500px",
crop: false,
sizeBreakpoints: {"on":null,"base":null,"rate":null},
backgroundsMaxWidth: 1920,
resizeStyleBackgrounds: true,
nativeLazyLoad: false,
safeLazyBackgrounds: true,
asyncInitialParsing: true,
debug: false,
doSelectors: [{"selectors":"img","type":"attr","targetAttr":"src","attrType":"url","lazy":true,"resize":true},{"selectors":"[data-spai-bg-on]","type":"attr","targetAttr":"style","attrType":"style"},{"selectors":"style","type":"inner","attrType":"style"},{"type":"__stylesheet"}],
exclusions: {"selectors":[],"urls":{"regex:\/\\\/\\\/([^\\\/]*\\.|)gravatar.com\\\/\/":{"lazy":0,"cdn":0,"resize":0,"lqip":0,"crop":-1}}},
sizeFromImageSuffix: true,
ajax_url: "https://rayarivera.com/wp-admin/admin-ajax.php"
};
b.appendChild(s);
}(window, document));
Skip to content
Jessamine County, Kentucky
Jessamine County
15 minutes from Lexington, dramatic Palisades scenery
Jessamine County Real Estate
Jessamine County is the answer to a question a lot of Lexington buyers are asking: “Where can I get more house for my money without giving up access to everything Lexington offers?” The answer is 15 minutes south on Nicholasville Road.
With a population of about 56,500 and growing fast — Nicholasville alone grew 440% between 1970 and 2020 — Jessamine County has become one of Kentucky’s most popular commuter communities. The county seat, Nicholasville, sits just 11 miles from downtown Lexington. You can live here, work in Lexington, and shave $50K–$100K off what you’d pay for a comparable home in Fayette County.
But Jessamine County isn’t just a cheaper version of Lexington. It has its own identity — dramatic natural scenery that most surrounding counties can’t match, a growing school district that just earned a “High-Performing” state designation, and a cost of living 13% below the national average.
Nicholasville
Nicholasville is the hub — a city of about 33,000 with the retail, restaurants, and services you need for daily life. It’s not a charming historic downtown the way Georgetown or Midway are — it’s more of a practical, growing small city. But it works, and its proximity to Lexington means you’re never far from anything the county doesn’t have.
Brannon Crossing sits right on the Jessamine/Fayette border, about 6 miles south of downtown Lexington and 6 miles north of downtown Nicholasville. It’s a mixed-use community with apartments, condos, and retail shopping that functions as a bridge between the two. For buyers who want a Jessamine County address with Lexington-adjacent convenience, Brannon Crossing is the sweet spot.
Wilmore
Wilmore is a small town of about 6,000 people, home to Asbury University and Asbury Theological Seminary. It has a tight-knit community feel, strong faith-based culture, and proximity to High Bridge Park and the Kentucky River Palisades. It’s quieter and more intentional than Nicholasville — a place where people know their neighbors and choose the slower pace deliberately.
The Palisades
This is Jessamine County’s secret weapon. The Kentucky River Palisades run along the county’s entire southern border — 42 miles of riverbank with 220-foot limestone cliff walls. It’s some of the most dramatic natural scenery in Central Kentucky, and most people in Lexington don’t even know it’s there.
High Bridge Park is the crown jewel. When it was built in 1877, High Bridge was the highest railroad trestle in the world. The restored Victorian-era park now offers overlooks of the Kentucky River Gorge, a museum, playground, and picnic facilities. It’s a genuine “wow” destination 20 minutes from Lexington.
Jim Beam Nature Preserve — a collaboration between The Nature Conservancy and Jim Beam — offers trails through the Palisades in Jessamine and Garrard counties. Chrisman Mill Vineyards & Winery operates in the area, continuing a wine-making heritage that dates to the late 1700s — First Vineyard, the first commercial vineyard in America, was established in Jessamine County.
For buyers who value outdoor access, Jessamine County delivers something the Lexington neighborhoods simply can’t: dramatic river gorge scenery, hiking, kayaking, and natural beauty within 15 minutes of urban convenience.
Schools
Jessamine County Public Schools earned a “High-Performing” (Green) designation from the 2024-25 Kentucky Summative Assessment results — official state recognition of strong and improving academic performance. Niche gives the district a B+ with 12 schools serving 8,397 students at a 16:1 student-teacher ratio. Math proficiency is 41% and reading is 47%.
These are solid numbers, and the trend is positive. The top elementary school earns an A- from Niche. For families comparing options, Jessamine’s schools are stronger than Bourbon County (4/10) and competitive with Scott County (B rating).
Housing
The median home price in Jessamine County is approximately $343K–$347K, with homes averaging 41 days on market. Wilmore tends slightly higher (~$350K median) while Nicholasville is slightly more affordable (~$320K).
New construction subdivisions ($280K–$400K): Active development with modern floor plans, open concepts, and community amenities. This is where most first-time and move-up buyers land.
Established neighborhoods ($300K–$450K): Homes built in the 1990s and 2000s in Nicholasville’s established residential areas. Mature landscaping, larger lots than new construction, and proximity to schools and services.
Rural properties and acreage ($350K–$700K+): Parcels near the Palisades, horse properties, and custom builds on 5–20+ acres. The scenery on the southern end of the county — near Wilmore and High Bridge — is stunning.
Brannon Crossing area ($300K–$500K): The Fayette/Jessamine border zone. Newer builds, condos, and homes that give you Jessamine pricing with Lexington proximity.
For comparison: $345K in Jessamine County buys what $400K–$450K buys in Hamburg or Masterson Station. The commute difference is 5–10 minutes. The savings are real.
Commute
- Nicholasville to downtown Lexington: 15–22 minutes (11–13 miles via US-27/Nicholasville Road)
- Nicholasville to UK campus: 15–20 minutes
- Brannon Crossing to Lexington: 10–15 minutes
- Nicholasville to Hamburg: 25–30 minutes
- Nicholasville to Bluegrass Airport: 20–25 minutes
The Nicholasville Road corridor is the lifeline. It can get congested during rush hour, but it’s a straight shot into Lexington with no highway merges or complicated routing. Many Jessamine County residents time their commute around the peaks and find it completely manageable.
Who Buys Here
Lexington commuters seeking value — the #1 buyer profile. People who work at UK, Baptist Health, or downtown offices and want a newer, larger home than what they can afford in Fayette County.
First-time buyers — the sub-$300K options in Jessamine County open doors that are closing in Lexington. Young couples and individuals can actually own here.
Outdoor enthusiasts — the Palisades, High Bridge, kayaking on the Kentucky River, and the winery/vineyard scene attract buyers who prioritize nature access.
Families — the schools earned a “High-Performing” designation, the cost of living is low, and the community feel in towns like Wilmore is genuinely appealing for raising kids.
What Buyers Should Know
Growth trajectory: Jessamine County is one of Kentucky’s fastest-growing counties. That means increasing property values, improving infrastructure, and more services — but also more construction and traffic on Nicholasville Road during the transition.
Property taxes: Jessamine County tax rates are generally lower than Fayette County, adding to the cost savings of buying here.
The Brannon Crossing question: If you want the closest thing to Lexington without the Fayette County price tag, Brannon Crossing is where to look. It’s technically Jessamine County but functionally adjacent to Lexington’s south side.
Investment perspective: The combination of population growth, proximity to Lexington, improving schools, and relatively affordable pricing makes Jessamine County a strong value play. Properties here should continue appreciating as Lexington’s prices push more buyers south.
For buyers looking at luxury properties or farm land in Jessamine County, the southern end near the Palisades offers some of the most scenic land in the Bluegrass — and at prices well below Woodford County.
If Jessamine County is on your radar, reach out. I can walk you through the neighborhoods, the Brannon Crossing options, and help you figure out exactly where the best value sits right now.
Frequently Asked Questions
How far is Jessamine County from Lexington?
Nicholasville is about 11–13 miles from downtown Lexington, roughly 15–22 minutes via Nicholasville Road. Brannon Crossing on the county border is even closer — about 10–15 minutes from Lexington.
What are Jessamine County schools like?
Jessamine County Public Schools earned a “High-Performing” (Green) designation from the 2024-25 Kentucky state assessment. Niche rates the district B+ with 8,397 students across 12 schools.
What is the median home price in Jessamine County?
Approximately $343K–$347K, with Nicholasville trending around $320K and Wilmore around $350K. This is significantly more affordable than equivalent homes in Fayette County.
What are the Kentucky River Palisades?
42 miles of dramatic 220-foot limestone cliff walls along the Kentucky River on Jessamine County’s southern border. High Bridge Park offers overlooks of the gorge — when built in 1877, High Bridge was the highest railroad trestle in the world.
Is Jessamine County good for first-time buyers?
Yes — it’s one of the most accessible markets near Lexington. Sub-$300K options exist, the cost of living is 13% below the national average, and you’re still within a 15–22 minute commute of Lexington’s jobs.
What is Brannon Crossing?
A mixed-use community right on the Jessamine/Fayette county line, about 6 miles south of downtown Lexington. It offers Jessamine County pricing with Lexington-adjacent convenience — apartments, condos, retail, and newer homes.
What makes Jessamine County different from other surrounding counties?
The closest commute to Lexington (15 minutes), dramatic Palisades scenery, “High-Performing” school designation, wine-making heritage (First Vineyard), and a growth rate that’s among the fastest in Kentucky.
Your Local Expert
Interested in Jessamine County?
I’d love to show you around and help you find the right home.
859-710-9033
Raya Rivera
Real Estate Advisor • The Brokerage KY
(function(){
var h = document.querySelector('.site-header');
if (!h) return;
window.addEventListener('scroll', function(){
if (window.scrollY > 100) {
h.classList.add('scrolled');
} else {
h.classList.remove('scrolled');
}
});
})();
// Mobile hamburger menu
(function(){
var header = document.querySelector('.site-header .inside-header');
if (!header) return;
var ham = document.createElement('button');
ham.className = 'rr-hamburger';
ham.setAttribute('aria-label', 'Menu');
ham.setAttribute('aria-expanded', 'false');
ham.innerHTML = '<span></span><span></span><span></span>';
header.appendChild(ham);
var overlay = document.createElement('div');
overlay.className = 'rr-mobile-overlay';
var navLinks = document.querySelectorAll('.main-navigation .main-nav > ul > li > a');
navLinks.forEach(function(a) {
var link = document.createElement('a');
link.href = a.href;
link.textContent = a.textContent;
overlay.appendChild(link);
});
var closeBtn = document.createElement('button');
closeBtn.className = 'rr-nav-close';
closeBtn.textContent = 'CLOSE';
closeBtn.setAttribute('aria-label', 'Close menu');
overlay.insertBefore(closeBtn, overlay.firstChild);
document.body.appendChild(overlay);
function toggleMenu() {
var isOpen = overlay.classList.toggle('open');
ham.classList.toggle('active');
ham.setAttribute('aria-expanded', isOpen);
document.body.style.overflow = isOpen ? 'hidden' : '';
}
ham.addEventListener('click', toggleMenu);
closeBtn.addEventListener('click', toggleMenu);
overlay.querySelectorAll('a').forEach(function(a) {
a.addEventListener('click', function() {
if (overlay.classList.contains('open')) toggleMenu();
});
});
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape' && overlay.classList.contains('open')) toggleMenu();
});
})();
(function(){var c=document.getElementById('sticky-cta'),s=false;window.addEventListener('scroll',function(){if(window.scrollY>400&&!s){c.style.transform='translateY(0)';s=true;}else if(window.scrollY<=400&&s){c.style.transform='translateY(100%)';s=false;}});})();
!function(){"use strict";if("querySelector"in document&&"addEventListener"in window){var e=document.body;e.addEventListener("pointerdown",(function(){e.classList.add("using-mouse")}),{passive:!0}),e.addEventListener("keydown",(function(){e.classList.remove("using-mouse")}),{passive:!0})}}();
/**
* Raya Rivera — Unified Form Handler v1.0 — Replaces CF7, snippet #157313, all legacy handlers
*
* WPCode-ready. Attach via WPCode snippet (Site Wide Footer, JavaScript).
* Requires server-side companion: admin-ajax handler for 'rr_unified_lead' action.
*/
(function () {
'use strict';
const RR_FORM_CONFIG = {
ghlEndpoint: '/wp-admin/admin-ajax.php',
action: 'rr_unified_lead',
nonce: typeof rrFormNonce !== 'undefined' ? rrFormNonce : '',
turnstileSiteKey: '',
phone: '(859) 710-9033',
successMessages: {
contact: "Thanks! I'll be in touch within the hour.",
'home-value': "Got it! Your personalized home value report will be in your inbox within 24 hours.",
consultation: "You're all set! I'll reach out shortly to confirm your consultation.",
'open-house': "You're registered! I'll send you the details shortly.",
default: "Thanks for reaching out! I'll be in touch soon."
}
};
/* ───────── Selectors ───────── */
const KNOWN_IDS = [
'homeValueForm',
'contactForm',
'buyerForm',
'openHouseForm',
'rr-consultation-form',
'rr-sell-form',
'raya-home-value-form',
'home-value-form'
];
/* ───────── Utilities ───────── */
function stripPhone(val) {
return (val || '').replace(/\D/g, '');
}
function formatPhone(digits) {
if (digits.length === 10) {
return '(' + digits.slice(0, 3) + ') ' + digits.slice(3, 6) + '-' + digits.slice(6);
}
if (digits.length === 11 && digits[0] === '1') {
return '(' + digits.slice(1, 4) + ') ' + digits.slice(4, 7) + '-' + digits.slice(7);
}
return digits;
}
function isValidEmail(str) {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(str);
}
function resolveFormType(form) {
var type = form.getAttribute('data-form-type');
if (type) return type;
var id = form.id || '';
if (/home.?value/i.test(id)) return 'home-value';
if (/contact/i.test(id)) return 'contact';
if (/buyer/i.test(id)) return 'buyer';
if (/open.?house/i.test(id)) return 'open-house';
if (/consultation/i.test(id)) return 'consultation';
if (/sell/i.test(id)) return 'home-value';
// Field-signature detection: address + timeline = sell/home-value form
var hasAddress = !!form.querySelector('[name*="address"], [name*="street"]');
var hasTimeline = !!form.querySelector('[name*="timeline"], [name*="timeframe"]');
if (hasAddress && hasTimeline) return 'home-value';
return 'contact';
}
function getSuccessMessage(type) {
return RR_FORM_CONFIG.successMessages[type] || RR_FORM_CONFIG.successMessages.default;
}
/* ───────── Analytics ───────── */
function pushEvent(eventName, data) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push(Object.assign({ event: eventName }, data));
}
/* ───────── Turnstile ───────── */
function injectTurnstile(form) {
if (!RR_FORM_CONFIG.turnstileSiteKey) return;
// Load Turnstile script once
if (!document.querySelector('script[src*="turnstile"]')) {
var s = document.createElement('script');
s.src = 'https://challenges.cloudflare.com/turnstile/v0/api.js';
s.async = true;
s.defer = true;
document.head.appendChild(s);
}
// Render widget before submit button
var submit = form.querySelector('[type="submit"], button[type="submit"], .rr-form__submit');
if (!submit) return;
if (form.querySelector('.cf-turnstile')) return; // already rendered
var widget = document.createElement('div');
widget.className = 'cf-turnstile';
widget.setAttribute('data-sitekey', RR_FORM_CONFIG.turnstileSiteKey);
submit.parentNode.insertBefore(widget, submit);
}
function getTurnstileToken(form) {
var el = form.querySelector('.cf-turnstile');
if (!el) return '';
var input = el.querySelector('[name="cf-turnstile-response"]');
return input ? input.value : '';
}
/* ───────── Validation ───────── */
function clearFieldError(field) {
field.classList.remove('error');
var msg = field.parentElement ? field.parentElement.querySelector('.rr-form__error') : null;
if (msg) msg.textContent = '';
}
function setFieldError(field, message) {
field.classList.add('error');
var container = field.parentElement;
if (!container) return;
var msg = container.querySelector('.rr-form__error');
if (!msg) {
msg = document.createElement('span');
msg.className = 'rr-form__error';
container.appendChild(msg);
}
msg.textContent = message;
}
function validateForm(form) {
var errors = [];
var required = form.querySelectorAll('[required]');
for (var i = 0; i < required.length; i++) {
var field = required[i];
clearFieldError(field);
var val = (field.value || '').trim();
if (field.type === 'checkbox') {
if (!field.checked) {
setFieldError(field, 'This field is required.');
errors.push(field);
}
continue;
}
if (!val) {
setFieldError(field, 'This field is required.');
errors.push(field);
continue;
}
if (field.type === 'email' && !isValidEmail(val)) {
setFieldError(field, 'Please enter a valid email address.');
errors.push(field);
continue;
}
if (field.type === 'tel' || field.name === 'phone' || /phone/i.test(field.name)) {
if (stripPhone(val).length < 10) {
setFieldError(field, 'Please enter a valid phone number (10+ digits).');
errors.push(field);
continue;
}
}
}
// Transactional consent checkbox — must be checked (handle all naming conventions)
var txConsent = form.querySelector('[name="smsConsentTransactional"], [name="sms_consent"], [name="tcpa-consent"]');
if (txConsent && !txConsent.checked) {
setFieldError(txConsent, 'Transactional consent is required.');
errors.push(txConsent);
}
// Turnstile validation
if (RR_FORM_CONFIG.turnstileSiteKey && !getTurnstileToken(form)) {
var tsEl = form.querySelector('.cf-turnstile');
if (tsEl) {
var tsErr = document.createElement('span');
tsErr.className = 'rr-form__error';
tsErr.textContent = 'Please complete the security check.';
tsEl.appendChild(tsErr);
errors.push(tsEl);
}
}
if (errors.length) {
errors[0].scrollIntoView({ behavior: 'smooth', block: 'center' });
if (errors[0].focus) errors[0].focus();
}
return errors.length === 0;
}
/* ───────── Submission ───────── */
function submitForm(form) {
var type = resolveFormType(form);
var submitBtn = form.querySelector('[type="submit"], button[type="submit"], .rr-form__submit');
// Disable button
if (submitBtn) {
submitBtn.disabled = true;
submitBtn.setAttribute('data-original-text', submitBtn.textContent);
submitBtn.textContent = 'SENDING...';
}
// Build FormData
var fd = new FormData(form);
fd.append('action', RR_FORM_CONFIG.action);
// Read nonce at submit time (not parse time) in case jQuery loaded after us
var nonce = (typeof rrFormNonce !== 'undefined') ? rrFormNonce : RR_FORM_CONFIG.nonce;
fd.append('nonce', nonce);
fd.append('form_type', type);
fd.append('page_url', window.location.href);
fd.append('referrer', document.referrer || '');
// Consent tags (handle all naming conventions)
var tags = [];
var txConsent = form.querySelector('[name="smsConsentTransactional"], [name="sms_consent"], [name="tcpa-consent"]');
if (txConsent && txConsent.checked) tags.push('sms:consent-transactional');
var mktConsent = form.querySelector('[name="smsConsentMarketing"], [name="marketing_consent"]');
if (mktConsent && mktConsent.checked) tags.push('sms:consent-marketing');
if (tags.length) fd.append('consent_tags', tags.join(','));
// Turnstile token
if (RR_FORM_CONFIG.turnstileSiteKey) {
var token = getTurnstileToken(form);
if (token) fd.append('cf-turnstile-response', token);
}
// Analytics
pushEvent('form_submission', { form_type: type, form_page: location.pathname });
// Send
fetch(RR_FORM_CONFIG.ghlEndpoint, {
method: 'POST',
body: fd,
credentials: 'same-origin'
})
.then(function (res) {
return res.json().then(function (data) {
return { status: res.status, data: data };
});
})
.then(function (result) {
var status = result.status;
var data = result.data;
if ((status === 200 && data.success) || status === 400) {
// 400 = duplicate contact, still treat as success
showSuccess(form, type);
} else {
showError(form, submitBtn, (data && data.data && data.data.message) || 'Something went wrong. Please try again.');
}
})
.catch(function () {
showError(form, submitBtn, 'Network error. Please check your connection and try again.');
});
}
function showSuccess(form, type) {
// Hide form fields
form.style.display = 'none';
// Show success element
var parent = form.parentElement;
var successEl = parent ? parent.querySelector('.rr-form__success') : null;
if (successEl) {
successEl.classList.add('active');
successEl.textContent = getSuccessMessage(type);
} else if (parent) {
// Create success element if none exists
successEl = document.createElement('div');
successEl.className = 'rr-form__success active';
successEl.textContent = getSuccessMessage(type);
parent.appendChild(successEl);
}
}
function showError(form, submitBtn, message) {
// Show form-level error
var errEl = form.querySelector('.rr-form__form-error');
if (!errEl) {
errEl = document.createElement('div');
errEl.className = 'rr-form__form-error';
form.appendChild(errEl);
}
errEl.textContent = message;
// Re-enable button
if (submitBtn) {
submitBtn.disabled = false;
submitBtn.textContent = submitBtn.getAttribute('data-original-text') || 'Submit';
}
}
/* ───────── Phone Formatter ───────── */
function attachPhoneFormatter(form) {
var phoneFields = form.querySelectorAll('input[type="tel"], input[name*="phone"]');
for (var i = 0; i < phoneFields.length; i++) {
phoneFields[i].addEventListener('blur', function () {
var digits = stripPhone(this.value);
if (digits.length >= 10) {
this.value = formatPhone(digits);
}
});
}
}
/* ───────── Form Start Tracking ───────── */
function trackFormStart(form, type) {
var tracked = false;
var inputs = form.querySelectorAll('input, textarea, select');
for (var i = 0; i < inputs.length; i++) {
inputs[i].addEventListener('focus', function () {
if (!tracked) {
tracked = true;
pushEvent('form_start', { form_type: type });
}
});
}
}
/* ───────── Clear Errors on Focus ───────── */
function attachClearOnFocus(form) {
var inputs = form.querySelectorAll('input, textarea, select');
for (var i = 0; i < inputs.length; i++) {
inputs[i].addEventListener('focus', function () {
clearFieldError(this);
});
}
}
/* ───────── Cleanup ───────── */
function removeOldHandlers(form) {
// Clone and replace to strip all existing event listeners
var clone = form.cloneNode(true);
form.parentNode.replaceChild(clone, form);
return clone;
}
function removeLegacyElements(form) {
// Remove old .cs-legal disclaimer divs
var legacyDisclaimers = form.querySelectorAll('.cs-legal');
for (var i = 0; i < legacyDisclaimers.length; i++) {
legacyDisclaimers[i].parentNode.removeChild(legacyDisclaimers[i]);
}
}
/* ───────── Init ───────── */
function init() {
var forms = [];
// Collect forms by class
var byClass = document.querySelectorAll('.rr-form');
for (var i = 0; i < byClass.length; i++) {
forms.push(byClass[i]);
}
// Collect forms by known IDs
for (var j = 0; j < KNOWN_IDS.length; j++) {
var el = document.getElementById(KNOWN_IDS[j]);
if (el && forms.indexOf(el) === -1) {
forms.push(el);
}
}
// Collect CF7 forms (intercept before CF7 handles them)
var cf7Forms = document.querySelectorAll('.wpcf7-form');
for (var c = 0; c < cf7Forms.length; c++) {
if (forms.indexOf(cf7Forms[c]) === -1) {
forms.push(cf7Forms[c]);
}
}
// Field-signature detection: forms with address + timeline fields
var allForms = document.querySelectorAll('form');
for (var k = 0; k < allForms.length; k++) {
var f = allForms[k];
if (forms.indexOf(f) !== -1) continue;
// Skip WP admin/search forms
if (f.id === 'adminbarsearch' || f.getAttribute('role') === 'search') continue;
var hasAddr = !!f.querySelector('[name*="address"], [name*="street"]');
var hasTime = !!f.querySelector('[name*="timeline"], [name*="timeframe"]');
if (hasAddr && hasTime) {
forms.push(f);
}
}
// Mark each form so we know it's ours
for (var m = 0; m < forms.length; m++) {
forms[m].setAttribute('data-rr-unified', 'true');
// Phone formatter
attachPhoneFormatter(forms[m]);
// Analytics — form start
trackFormStart(forms[m], resolveFormType(forms[m]));
// Clear errors on focus
attachClearOnFocus(forms[m]);
}
}
// Capture ALL form submissions at the document level BEFORE any other handler
// Using capture phase (true) means this fires before CF7, inline handlers, everything
document.addEventListener('submit', function (e) {
var form = e.target;
if (!form || form.tagName !== 'FORM') return;
// Skip admin/search forms
if (form.id === 'adminbarsearch' || form.getAttribute('role') === 'search') return;
// Check if this is a form we should handle
var isOurs = form.getAttribute('data-rr-unified') === 'true';
var isCF7 = form.classList.contains('wpcf7-form');
var isKnownId = KNOWN_IDS.indexOf(form.id) !== -1;
var hasLeadFields = !!form.querySelector('[name*="email"], [name="your-email"]');
if (isOurs || isCF7 || isKnownId || hasLeadFields) {
// Stop ALL other handlers from firing
e.preventDefault();
e.stopImmediatePropagation();
if (validateForm(form)) {
submitForm(form);
}
}
}, true); // true = capture phase, fires FIRST
// Run init on DOM ready to mark forms and attach formatters
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
})();
/**
* RivOps - A2P SMS Consent Injection for /sell/ and /consultation/ forms v2.1
* Fixes CSS conflict: injects consent block OUTSIDE the form's grid wrapper.
*/
(function () {
'use strict';
var BRAND = 'Rivera Realty, LLC';
var PRIVACY_URL = '/privacy/';
var TERMS_URL = '/terms-and-conditions/';
// Inject scoped stylesheet once
function injectStyles() {
if (document.getElementById('rr-consent-styles')) return;
var css = [
'.rr-consent-block{display:block !important;width:100% !important;grid-column:1/-1 !important;margin:1.25em 0 !important;padding:1em 1.15em !important;border:1px solid #e5e5e5 !important;border-radius:6px !important;background:#fafafa !important;box-sizing:border-box !important;}',
'.rr-consent-block label.rr-consent-item{display:flex !important;flex-direction:row !important;gap:.65em !important;align-items:flex-start !important;margin:0 0 .9em 0 !important;line-height:1.5 !important;font-size:.88em !important;color:#333 !important;flex-wrap:nowrap !important;width:100% !important;}',
'.rr-consent-block label.rr-consent-item:last-child{margin-bottom:0 !important;}',
'.rr-consent-block label.rr-consent-item input[type=checkbox]{margin:.25em 0 0 0 !important;flex:0 0 16px !important;width:16px !important;height:16px !important;}',
'.rr-consent-block label.rr-consent-item .rr-consent-text{flex:1 1 auto !important;display:block !important;width:auto !important;max-width:100% !important;word-wrap:break-word !important;}',
'.rr-consent-block a{color:#2a6496;text-decoration:underline;}'
].join('');
var s = document.createElement('style');
s.id = 'rr-consent-styles';
s.textContent = css;
document.head.appendChild(s);
}
function consentBlock() {
var wrap = document.createElement('div');
wrap.className = 'rr-consent-block';
wrap.innerHTML = [
'<label class="rr-consent-item">',
' <input type="checkbox" name="smsConsentTransactional" required>',
' <span class="rr-consent-text">By checking this box, I consent to receive text messages from ' + BRAND + ' at the phone number provided, regarding my inquiry and the real estate services I am requesting. Message frequency varies. Msg & data rates may apply. Reply HELP for help, STOP to opt out. View our <a href="' + PRIVACY_URL + '" target="_blank" rel="noopener">Privacy Policy</a> and <a href="' + TERMS_URL + '" target="_blank" rel="noopener">Terms</a>.</span>',
'</label>',
'<label class="rr-consent-item">',
' <input type="checkbox" name="smsConsentMarketing">',
' <span class="rr-consent-text">Optional: I additionally consent to receive marketing and promotional messages from ' + BRAND + ' including market updates, new listings, and real estate tips. Consent is not a condition of purchase. Msg & data rates may apply. Reply STOP to opt out.</span>',
'</label>'
].join('');
return wrap;
}
function isTargetForm(form) {
if (!form || form.tagName !== 'FORM') return false;
if (form.getAttribute('data-rr-consent-injected') === '1') return false;
if (form.querySelector('input[name="smsConsentTransactional"], input[name="sms_consent"], input[name="smsConsentMarketing"], input[name="marketing_consent"]')) return false;
if (form.id === 'rr-consultation-form') return true;
var hasAddr = !!form.querySelector('[name*="address"], [name*="street"], [name*="property-address"]');
var hasTime = !!form.querySelector('[name*="timeline"], [name*="timeframe"]');
return hasAddr && hasTime;
}
function injectConsent(form) {
var submit = form.querySelector('[type="submit"], button[type="submit"], .rr-form__submit');
if (!submit) return false;
// Find the outermost wrapper inside the form that is a direct child containing submit (escape grid)
var node = submit;
while (node.parentElement && node.parentElement !== form) {
node = node.parentElement;
}
// Insert the consent block before this top-level wrapper (sibling of grid row)
var block = consentBlock();
form.insertBefore(block, node);
form.setAttribute('data-rr-consent-injected', '1');
return true;
}
function scan() {
injectStyles();
var forms = document.querySelectorAll('form');
for (var i = 0; i < forms.length; i++) {
if (isTargetForm(forms[i])) injectConsent(forms[i]);
}
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', scan);
} else {
scan();
}
setTimeout(scan, 500);
setTimeout(scan, 1500);
})();
var generatepressMenu = {"toggleOpenedSubMenus":true,"openSubMenuLabel":"Open Sub-Menu","closeSubMenuLabel":"Close Sub-Menu"};
//# sourceURL=generate-menu-js-before