Sign in

Neon API reference guide

This section documents the methods and properties of Neon's core object.

Neon's core object can be accessed using the global variable neon. Several of Neon's methods also return a copy or derivative of Neon's core object.


  1. .addClass()

    Add a single classname to the class attribute of the selected elements.
  2. .append()

    Append new elements inside the selected elements.
  3. .build()

    Create new elements and content for inserting into the document.
  4. .contains()

    Find out if the supplied element is a descendent of the selected element.
  5. .empty()

    Clear the contents of the selected elements.
  6. .getHttp()

    Perform an HTTP request to the server (AJAX).
  7. .getPosition()

    Fetch and return the dimensions and position of an element as coordinates.
  8. .getStyle()

    Fetch and return the computed/current style property of an element.
  9. .insert()

    Insert new elements into the document before the selected element(s).
  10. .jsonDecode()

    Decode JSON-encoded data.
  11. .load()

    Asynchronously load and execute an external Javascript file.
  12. .loaddir

    Set the base URL used for subsequent calls to .load().
  13. .ready()

    Register a function to be executed after the page structure has loaded.
  14. .remove()

    Remove the selected elements from the document.
  15. .removeAttribute()

    Remove an attribute from the selected elements.
  16. .removeClass()

    Remove a single classname from the class attribute of the selected elements.
  17. .select()

    Find elements in the document.
  18. .setAttribute()

    Set an attribute on the selected elements.
  19. .style()

    Set an inline style property, or starts an animation.
  20. .styleRule()

    Insert a style rule into the page's stylesheet, affecting current and future elements.
  21. .unwatch()

    De-register an event handler that was previously registered with .watch().
  22. .watch()

    Registers a function to handle events on the selected element(s).