Skip to content

robiulhr/baby-query

Repository files navigation

Baby Query

Baby Query is a custom implementation of the popular JavaScript library jQuery.

Features

  • Simple and minimal: Just call the function with selector $() you are ready to do changes.

  • Chainable methods: $("div").css("width","200px").text("Hello world")

  • Better performance: Runs much faster and more efficiently.

Environments in which to use Baby Query

  • Browser support

  • Baby Query also runs on the Node environment.

Methods

  • Core:

    • .ready(): Specify a function to execute when the DOM is fully loaded.
  • CSS:

    • .css(): Get the value of a computed style property for the first element in the set of matched elements or set one or more CSS properties for every matched element.
  • Dom Manipulation:

    • .after(): Insert content, specified by the parameter, after each element in the set of matched elements.

    • .append(): Insert content, specified by the parameter, to the end of each element in the set of matched elements.

    • .attr(): Get the value of an attribute for the first element in the set of matched elements also, Set one or more attributes for the set of matched elements.

    • .html(): Get the HTML contents of the first element in the set of matched elements or set the HTML contents of every matched element.

    • .text(): Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.

  • Events

    • .on(): Attach an event handler function for one or more events to the selected elements.

    • .trigger(): Execute all handlers and behaviors attached to the matched elements for the given event type.

Read the Documentation here

Personal Blog Roblog, resource for learning web development.

About

Baby Query is a custom implementation of the popular JavaScript library jQuery.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published