GithubHelp home page GithubHelp logo

domquery's Introduction

##DOMQuery Lightweight JavaScript library utilizing native Web API for efficient DOM interaction. Inspired by jQuery.

##Instructions To use the libary include "./lib/DOMQuery.js" in a script tag in your html file.

##Public API

  • $l(selector) - find all the html elements that match the selector and create new DOMNodeCollection
  • $l(function) - adds a callback to be executed on document ready
  • $l(DOMNodeObject) - places a DOMQuery wrapper around the object
  • $l.ajax(optionsHash) - asynchronous XMLHttpRequest
  • $l.extend(target,[objectA],[objectB]) - concatenate new objects into target

##DOM Class Manipulation

  • html(input) - sets the value of the internal HTML of all the DOMNodes
  • empty() - clears the value of the inner HTML of all the DOMNodes
  • append(content) - insert content to the end of each element in the set of matched elements
  • children() - returns DOMNodeCollection of ALL children of all nodes in the array
  • parent() - return DOMNodeCollection fo the parent(s) of each of the nodes
  • find(selector) - finds all the DOMNodes matching the selector passed in that descendants of the nodes
  • remove() - removes the HTML of all the nodes in the array from the DOM
  • attr(attributeName, value) - get the value of an attribute for the first element in the set of matched elements or set one of more attributes for every matched element
  • addClass(className) - adds the specified CSS class(es) to each element in set of matched elements
  • removeClass(className) - removes the specified class from each element in set of matched elements
  • on(type, function) - attach an event handler function for one or more events to the selected elements
  • off(type) - remove an event handler.

domquery's People

Contributors

s-cardenas avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.