Your search is in good hands

  • Pricing
  • Documentation
    • User guides
    • Support
    • Features
      • Roadmap
      • Artificial Intelligence
      • Elasticsearch
      • OpenSearch
      • Solr
      • Algolia
      • Weaviate
      • Hosting
      • Addons (Plugins, themes, features)
      • Releases
    • Blog
  • Demo
    • All Demos
    • Testimonials
  • My Licenses
    • Login
    • Why us
    • Contact us
Menu
  • Pricing
  • Documentation
    • User guides
    • Support
    • Features
      • Roadmap
      • Artificial Intelligence
      • Elasticsearch
      • OpenSearch
      • Solr
      • Algolia
      • Weaviate
      • Hosting
      • Addons (Plugins, themes, features)
      • Releases
    • Blog
  • Demo
    • All Demos
    • Testimonials
  • My Licenses
    • Login
    • Why us
    • Contact us

Home » How to use jQuery selectors ?

How to use jQuery selectors ?

729 views 3 October 5, 2016 Updated on January 14, 2020 admin

jQuery selectors in wpsolr are used to associate live suggestions and geolocation to your theme’s search box(es).

When the wpsolr javascript code needs to identify your search box(es), to attach specific events, it does so by using jQuery selectors.

What is jQuery ?

jQuery is a javascript library, widely used to simplify the manipulation of the elements of a HTML page, the Document Object Model (DOM).

What are jQuery selectors ?

They are a way for a javascript code to identify a HTML element, or several HTML elements. It can be an id, a class, a name, a descendant, an ascendant. There are many ways to identify HTML elements in the Document Object Model (DOM).

See examples from w3schools

How do I find my selectors ?

In your browser, hover the search box for which you want to retrieve a selector from, then right click to open the browser inspector. It will show you the HTML code of your search box.

If the HTML code contains

id="myId"

then your jQuery selector could be

#myId

 

If the HTML code contains

class="myclass"

then your jQuery selector could be

.myclass

 

 

Tags:DOMjQueryjQuery selector

Was this helpful?

3 Yes  No
Login
Support
Privacy policy
  • Terms and Conditions
  • © 2020 wpsolr.com. All Rights Reserved.
Youtube
Roadmap