This little library in development is for people who are just starting out in JavaScript programming.
Always put it first before the other scripts you have added!
s_('h1');
s_('.h1');
s_('#h1');
s_('[attribute="h1']);
let title = s_('h1');
title.textContent = "Hello, World!";
s_All('h1')[0];
let title_All = s_All('h1')[0];
title_All.textContent = "Hello, World!"audio_({
src: "./src/media/audio.mp3",
container: "body",
controls: true,
preload: true,
autoplay: true
});image_({
src: "./src/media/image.png",
container: ".gallery"
});video_({
src: "./src/media/video.mp4",
container: ".content"
});const images = [
"./src/media/1.mp3", // <-- Counter starting from here
"./src/media/2.mp3",
"./src/media/3.mp3",
"./src/media/4.mp3"
];
image_({
src: "./src/media/image.png",
container: ".content",
repeat: true,
total: 4,
counter: 0
});
// ⭐ For videos and audios it is the same procedure!bgSound_({
src: "./src/media/myaudio.mp3"
});
// that easybgPreloader_({
src: "<h1> Loading... </h1>",
timeOut: 200 // <-- Seconds on ms
});
// that easy toobgPreloader_({
data: "img",
src: "./src/media/preloader.gif", // or .png/.jpg
timeOut: 200 // <-- Seconds on ms
});
// data: "img" or "video".
// if the data is not set, it will read the scr as pure html.:root {
--bg: #fff;
--color: #000;
}root_.setProperty('--bg', '#000');
------
// root_setProperty(name:variable, new:value);getJSON_({
url: "https://randomuser.me/api/",
event: data => { console.log(data) }
});