Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use YUI's

Tags:

jquery

yui

I experienced with JQuery and new to YUI.

I'm looking for YUI's equivalent of the JQuery "$(document).ready".

I found "onDOMReady". If I have a .JS document with a large number of functions, what is the right way to wrap them all in "onDOMReady"?

like image 945
edt Avatar asked May 18 '09 21:05

edt


People also ask

How does Yui bot work?

Yui Bot is a fun anime-based bot. It provides many commands related to the 16 categories: Moderation, Automation, Features, Permissions, Search, Util, Info, Fun, Economy, Gambling, Profiles, Skills, Image, Reaction, Counter, and Ships. To use the Yui Bot on your Discord server you have to invite it first.

Is the Yui bot shutting down?

Thus, the creator of Yui shut the project down on July 5th, 2022. As a game developer who worked on my own project in the last 18 years, I fully understand how much efforts need to be put into a personal project. I respect their decision and appreciate all the joys I had with Yui.

How do you hug on discord?

How To Use. Use ! hug @mention to hug a friend! As of now, you can only hug one friend at a time; you cannot hug an entire role.


1 Answers

In YUI3 you can do this (see below), but it's not really necessary, if you put the link to the YUI JS at the bottom of the html body tag, as recommended.

YUI().use('node', function(Y) {
      Y.on("domready", function(){
        console.log('dom is ready');
        // your code
      }); 
}); 
like image 107
Patrick Clancey Avatar answered Sep 19 '22 18:09

Patrick Clancey