Skip to content

Mer4ant/dopio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

Welcome to Dopio

A library to simplify writing JavaScript code


Let's start. Dopio code examples will be shown below

How to change the selected element's text through Dopio
<!-- Create an empty paragraph on html -->
<p></p>
// Change text on paragrag
dopio("p").text("Hello World!")

Dopio supports searching for elements not only by their tag, but also by class and id

dopio(".text").text("I")
dopio("#hi").text("Love")
dopio("h1").text("You!")
// 🍁 Below are all Dopio features and their description. 
html: Adding html code to an element
css: Adding css code to an element
text: Changing the text of an element
on: Simplified analogue of addEventListener from vanilla JavaScript
attribute: Attribute management for elements. If it takes a name, then reads the attribute, if it also takes a value, then overwrites the attribute
click: If it does not accept functions, then it makes an artificial click on the object, otherwise it listens for clicks on the object
addClass: Assigns a class to an element
each: Iterates over the elements of the collection
is: Used as a test for every element in the set. It accepts two arguments
// ❤️ An example of creating a plugin for dopio (As an example, hiding an element from the page)
dopioClass.prototype.hidden = function hidden() {
    for (const el of this.container) {
        el.style.display = "none";
    }
};
  
// Testing plugin
dopio(".text").hidden()

About

A library to simplify writing JavaScript code

Resources

License

Stars

Watchers

Forks

Packages

No packages published