Superdom.jsSuperdom.js

DOM query done easy.

Write DOM selectors in JavaScript quickly and manipulate DOM efficiently.

DOM Querying & Manipulation

Superdom.js is an easy to use JavaScript based DOM manipulation engine for browser based apps and websites. It is designed to be easily dropped in to a website and run queries on DOM elements.

Main Features

  • 100% Standalone

    A pure JavaScript library with no dependencies.

  • Completely modularized

    Written in easy to reuse modules with a high degree of extensibility.

  • Simple syntax

    Simple but powerful syntax which enables you to write selectors faster.

  • Optimal Performance

    Designed with performance in mind using native event delegation.

  • Small & faster

    Only 22KB minified and gzipped, so downloads faster.

  • Extensible

    Modular nature of the library makes Superdom highly extenisble.

  • Animation support

    Supports animation with the built-in FX library.

Selector Features

The test below selects items from a web page using an ID and then a class respectively.


  (function() {
    'use strict';

    describe("DOM.get()", function() {
      var result;

      it("should return a single element by id",
        function() {
          result = DOM.get('A');
          expect(result.elements.length).toEqual(1);
        }
      );
    });

    describe("DOM.query()", function() {
      var result;

      it("should return elements by class name",
        function() {
          result = DOM.query('.group');
          expect(result.elements.length).toEqual(2);
        }
      );
    });

  })();

Stay Updated

Follow @szaranger on Twitter to receive updates or to get in touch.

Follow me on Twitter