Slater
Get startedLog in
Get startedLog in

↑↓ to move ↵ to openPowered by Slater Search

JavaScript management

Write scripts with an AI editor, test them on staging, and ship them when they’re ready.

1. Create a script

Open JavaScript in your Slater account and choose New script. Describe what you want to the AI editor, or write it yourself.

Example
// Show a minimum-order note on the wholesale form
const form = document.querySelector('#order');
form?.addEventListener('submit', (e) => {
  const kg = Number(form.querySelector('.kg').value);
  if (kg < 5) { e.preventDefault(); showMinimum(); }
});

2. Choose where it runs

Run a script on every page, or only on pages that match a path like /shop/*.

3. Staging, then production

  1. Save to staging and check it on your webflow.io domain.
  2. When it works, publish to production. Slater keeps each version, so you can roll back.

Still looking for something?

Ask here and we’ll find it in the docs, or point you to the team.

Prefer email? [support email] To confirm

Answers from these docs, powered by Slater Search

Ask Slater Answers from these docs

Answers from these docs, powered by Slater Search