H
Hannan
Oracle Dev
Home
Projects
Blog
Shop
0
Book Appointment
Sign In
Developer
Blog
Oracle APEX · PL/SQL · SQL · WordPress · Career
Filters
All
8
Oracle Form
3
Oracle APEX
2
PL/SQL
1
Oracle SQL
1
Web Design & Development
1
Portfolio
0
Showing results for
"\' encodeURIComponent(q) \'"
(0 found)
Clear
Search Results
Newest First
A → Z
Most Discussed
No results for "\' encodeURIComponent(q) \'"
Try a different keyword or clear filters.
Browse All
closeBtn.addEventListener('click', closeDrawer); backdrop.addEventListener('click', closeDrawer); /* Cat chips in drawer */ document.querySelectorAll('.fd-cat-chip[data-cat]').forEach(function(el){ el.addEventListener('click',function(){ document.querySelectorAll('.fd-cat-chip[data-cat]').forEach(function(e){ e.classList.remove('sel'); }); el.classList.add('sel'); }); }); /* Sort opts */ document.querySelectorAll('.fd-sort-opt').forEach(function(el){ el.addEventListener('click',function(){ document.querySelectorAll('.fd-sort-opt').forEach(function(e){ e.classList.remove('sel'); }); el.classList.add('sel'); }); }); /* Popular tag chips -> fill input */ document.querySelectorAll('.fd-cat-chip[data-tag]').forEach(function(el){ el.addEventListener('click',function(){ document.getElementById('fd-tag-input').value = el.dataset.tag; el.classList.toggle('sel'); }); }); /* Reset */ document.getElementById('fd-reset').addEventListener('click',function(){ document.querySelectorAll('.fd-cat-chip[data-cat]').forEach(function(e){ e.classList.remove('sel'); }); document.querySelector('.fd-cat-chip[data-cat="0"]').classList.add('sel'); document.querySelectorAll('.fd-sort-opt').forEach(function(e){ e.classList.remove('sel'); }); document.querySelector('.fd-sort-opt[data-sort="date"]').classList.add('sel'); document.getElementById('fd-tag-input').value=''; document.querySelectorAll('.fd-cat-chip[data-tag]').forEach(function(e){ e.classList.remove('sel'); }); }); /* Apply */ document.getElementById('fd-apply').addEventListener('click',function(){ var cat = document.querySelector('.fd-cat-chip.sel[data-cat]'); var sort = document.querySelector('.fd-sort-opt.sel'); var tag = document.getElementById('fd-tag-input').value.trim(); var url = new URL('https://thehannan.com/blog/'); if(cat && cat.dataset.cat !== '0') url.searchParams.set('cat', cat.dataset.cat); if(sort && sort.dataset.sort !== 'date') url.searchParams.set('sort', sort.dataset.sort); if(tag) url.searchParams.set('tag', tag); window.location.href = url.toString(); }); /* ── Sort Select (inline) ── */ document.getElementById('blog-sort-sel').addEventListener('change',function(){ var url = new URL(window.location.href); if(this.value === 'date') url.searchParams.delete('sort'); else url.searchParams.set('sort', this.value); url.searchParams.delete('paged'); window.location.href = url.toString(); }); /* ── Live Search ── */ var lsInput = document.getElementById('blog-live-search'); var lsOverlay = document.getElementById('live-search-overlay'); var lsBox = document.getElementById('live-search-box'); var lsResults = document.getElementById('live-search-results'); var lsTimer; lsInput.addEventListener('input', function(){ var q = this.value.trim(); clearTimeout(lsTimer); if(q.length < 2){ hideLs(); return; } lsTimer = setTimeout(function(){ doSearch(q); }, 280); }); lsInput.addEventListener('keydown',function(e){ if(e.key === 'Enter'){ hideLs(); var url = new URL('https://thehannan.com/blog/'); if(lsInput.value.trim()) url.searchParams.set('bs', lsInput.value.trim()); window.location.href = url.toString(); } if(e.key === 'Escape') hideLs(); }); lsOverlay.addEventListener('click', hideLs); function doSearch(q){ lsResults.innerHTML = '
Searching…
'; lsBox.style.display = 'block'; lsOverlay.style.display = 'block'; fetch('https://thehannan.com/wp-admin/admin-ajax.php', { method:'POST', headers:{'Content-Type':'application/x-www-form-urlencoded'}, body:'action=hannan_blog_search&nonce=4890108594&q='+encodeURIComponent(q) }) .then(function(r){ return r.json(); }) .then(function(res){ if(res.success && res.data.length){ var html = res.data.map(function(p){ return '
' +(p.thumb?'
':'
') +'
'+p.title+'
' +'
'+p.cat+' · '+p.date+'
'; }).join(''); html += '
' +'
See all results for "'+q+'"
'; lsResults.innerHTML = html; } else { lsResults.innerHTML = '
No posts found for "
'+q+'
"
'; } }) .catch(function(){ hideLs(); }); } function hideLs(){ lsBox.style.display='none'; lsOverlay.style.display='none'; } })();