-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
ねゆんせ edited this page Jun 3, 2025
·
5 revisions
This library is based on Jquery, because jquery is somewhat outdated is that this clone is born.
jlib works in the same way as jquery, however, many of the events or functions of jquery are not recreated here. Either to simplify the code, jlib is easy and fast to use.
Get the nav
element and assign the class active
Jlib("nav").addClass("active")
A button when receiving the event click calls to a remote api and consumes from it the information, then it proceeds to paint it in html.
Jlib("button").event('click', async () => {
const r = await Jlib().remote("https://api.sampleapis.com/coffee/hot").get();
r.map(r => {
Jlib('#coffe').insertHTML(`<li><b>${r.title}:</b> ${r.description}</li>`)
})
})
Using Remote call to an api using get()
method
Jlib().remote("https://api.sampleapis.com/coffee/hot").get();