Help › Website plugin 1.1

The field and the results apart

The field in one place, the results in another

A big field at the top of a page with the results in a column below, or beside the article, is the same search drawn in two elements. In markup, give both the same name:

<div data-st-input="main"></div>
...
<div data-st-results="main"></div>

The settings (data-translations, data-limit …) go on the field's element. The pair works as a search with no setup does: the results show under the field's name wherever you put the results element, and a picked passage is read there.

From JavaScript

ScriptureTips.search({
  input: "#field",
  results: "#results",
});

input and results are elements or CSS selectors.

Searches that share a name

A search has a name (the name option; one is made up if you give none). Your page can reach it as ScriptureTipsSearch.get(name), to set the words, search, or listen to it.