Pass value to URL string and open in a new tab

PHOTO EMBED

Wed Oct 20 2021 16:16:12 GMT+0000 (UTC)

Saved by @markf_raindrop #jquery #javascript

// Functionality to pass along URI to location search feature subdomain
if (document.querySelector('#locations-search-wrapper')) {
  // Location Search Feature
  $('#locations-search-wrapper ._button').click(function(e){
    e.preventDefault();
    var loc_input = $('#locations-search-wrapper .styled-input').val();
    // Change domain and parameter ='s below.
    window.open('https://newsite-editme.com/?q=' + loc_input.toLowerCase(), '_blank');
  })
}
content_copyCOPY

lunagrill.com