Installation

Using jQuery#

<script type="text/javascript">
$.getScript("//cnstrc.com/js/cust/<your_custom_bundle_name>.js", function () {
$("#query").constructorAutocomplete({
key: "<your_api_key>",
});
});
</script>

To install with jQuery, use this code snippet. In this example, #query is the DOM selector of your search box, and <your_api_key> can be found on your dashboard.

Using HTML/JavaScript#

<script
type="text/javascript"
src="https://cnstrc.com/js/cust/<your_custom_bundle_name>.js"
></script>
<script>
const inputElement = document.querySelector("#query");
const autocomplete = new ConstructorioAutocomplete(inputElement, {
key: "<your_api_key",
});
</script>

To install with HTML/JavaScript, use this code snippet.