Sisyphus_TheHedgehog
Eternal Poster
Mga boss pwede kaya ma delay yung execution ng js or iexecute ng js ng theme after ma append ung custom content na ginawa?
setTimeout(function() {
// Dito mo ilalagay ang JavaScript code ng theme na gusto mong i-execute
}, 2000); // Ang 2000 dito ay milliseconds, kaya magiging 2 seconds bago ma-execute ang code
$("#element").delay(2000).queue(function(next) {
// Dito mo ilalagay ang JavaScript code ng theme na gusto mong i-execute
next();
});
async function delayExecution() {
await new Promise(resolve => setTimeout(resolve, 2000));
// Dito mo ilalagay ang JavaScript code ng theme na gusto mong i-execute
}
delayExecution();
Kaso yung gamit na js boss is yung sa theme ng wordpress or nasa head kaya nauuna magexecute kaysa sa pag append ng customize contentsetTimeout
ahh d ako marunong mag WP hahaa. basta ang alam ko lang timeout ang pang delay sa js hahaKaso yung gamit na js boss is yung sa theme ng wordpress or nasa head kaya nauuna magexecute kaysa sa pag append ng customize content
Sayang boss hindi nagana, triny ko din yung async kaso ayaw dindefer siguro try mo