Google Search Bar with JetSearch Plugin | Crocoblock

Published: 17 May 2023
on channel: Abhijit Rabha
515
27

This code uses jQuery to get the value of a query parameter from the current URL and set it to the value of the search bar. The first line of code uses the jQuery(document).ready() function to tell jQuery to execute the function inside the curly braces when the document is ready. The next line of code creates a new URLSearchParams object and sets it to the value of the current URL using the window.location.search property. The following line of code gets the value of the query parameter named s from the URLSearchParams object. The last line of code sets the value of the search bar to the value of the query parameter named s using the val() method. This code can be used to set the value of the search bar to the value of a query parameter from the current URL. This can be useful for a variety of purposes, such as pre-populating the search bar with a search term that the user has entered previously.

Get the Js Code : https://github.com/codewithrabha/sear...


Watch video Google Search Bar with JetSearch Plugin | Crocoblock online without registration, duration hours minute second in high quality. This video was added by user Abhijit Rabha 17 May 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 51 once and liked it 2 people.