Swelıty
Tools for everyone

Free Online jQuery Playground

Write jQuery and see it change the page live, with everything you log shown in a console beside the preview. Edit the script, HTML and CSS in separate tabs.

Press Run, or Ctrl or Cmd + Enter, to run your code. The page shows in Preview and everything you log shows in Console. Use Stop if a script never ends. jQuery 3 is loaded for you as $ and jQuery, and your script runs once the page is ready.

Preview

Console

Output appears here. Press Run, then try console.log("Hello")

How to use

  1. Write your script in the JavaScript tab, using $ or jQuery to select elements and handle events.

  2. Add the page itself in the HTML tab and your styles in the CSS tab.

  3. Press Run, or Ctrl or Cmd + Enter. The preview shows the page and the console shows what you log.

  4. Turn on Auto-run to refresh the preview as you type.

  5. Read console.log output, warnings and errors in the Console panel under the preview.

  6. Use Format to tidy the tab you are editing, or open the full screen editor for more room.

Why use this tool

  • jQuery 3.7

    The full jQuery build, loaded for you as $ and jQuery.

  • No ready handler needed

    Your script runs after the page is parsed, so the elements already exist.

  • Built-in console

    Output from console.log, plus warnings and errors, appears beside the preview.

  • Isolated preview

    Your code runs in an isolated frame, so it cannot reach this site or your other tabs.

  • Comfortable editor

    Resize the text, switch line wrapping on or off, or go full screen with the editor and preview side by side.

About this tool

Test jQuery 3 without building a page first. Write your script in the JavaScript tab, your markup in the HTML tab and your styles in the CSS tab, then press Run to watch the preview change, with the console beside it. jQuery is loaded as $ and jQuery and your script runs once the page is ready, so you can try a selector, an event handler or an animation straight away. It works well for learning jQuery, debugging a snippet, or checking an effect before it goes into a project.

Frequently asked questions

jQuery 3.7, the full build, loaded from a public CDN and verified with an integrity check.

No. Your script runs after the page is parsed, so the elements are already there. A ready handler still works if you prefer one.

Only jQuery itself is loaded. To try a plugin, add a script tag for it in the HTML tab, using a public https address that the browser allows.

Yes, the first time you press Run, because jQuery is fetched from a public CDN.

Yes. Untick Wrap long lines under the editor and it scrolls sideways instead. Your choice is remembered on this device.