Here is another post for YUI3 Node. Here I am going to present examples for adding Class, removing class and toggle css class dynamically using YUI.
YUI3 provides .addClass(‘foo’), .removeClass(‘foo’), .toggleClass(‘foo’), .hasClass(‘foo’) and .replaceClass(‘foo’, ‘bar’) for dynamically working with class on an element.
Javascript used in the example:
YUI().use(‘node’, function(Y)… (Continue)
YUI has a node utility for creating, collecting and manipulating node. Each node represent DOM node. It helps in managing style, subscribing to events, and dynamically loading content and many more things.
We can use Y.one() for single node, Y.all() for multiple node (nodeList) and node.one(), which is same as… (Continue)
I used to see many URLs which directly looking just a hacking attempts by hackers. Hackers are hackers they may continue to do that but we can try to prevent such effort. So, I hope you have take all common security measures discussed at many places for securing WordPress site.… (Continue)
I am checking Amazon’s cloudFront. It is faster than the Amazon S3 for obvious reason. For this to use I need to better revert back all files from Amazon S3 to my own domain so that I can utilize unlimited storage space on my server with fast speed of Amazon… (Continue)
You may like to read this article on YUI3 related to plugins, extension and widget before reading this.
This article is mostly scraped but shorten version of the article from the YUI article on Widget. I have published it here so that you read this before reading any widget related… (Continue)
Facebook has released HipHop Virtual Machine (HHVM) which has 60 percent faster execution engine than its current PHP interpreter and uses 90 percent less memory. I wish official PHP start using this!
Facebook is using this Virtual Machine in its test environment. Facebook says it Just-In-Time complier.
This new HHVM… (Continue)
I was reading an article and read about plugin. I came to know that plugin exists in YUI3. Then the question come to my mind what to do with plugins in YUI3. Widget are already there.
As I read here, Plugins are for atomic functionality and not for a set… (Continue)
Here is fourth post about YUI. It will result in Facebook like draggable floating div using YUI3. Earlier post about YUI3 were Learn YUI3, Learn YUI3: Playing with Events and Putting Callbacks, Learn YUI3: Attach Event to Dynamic Content.
This post is regarding Overlay using YUI3.
This a how the overlay look:… (Continue)
Here is a working sample with code for CSS overlay on Images. It is not using any JavaScript library. It is just HTML and CSS. It is very simple to create. Just you need to adjust the css for making the alignment very specific if you HTML is different. Important… (Continue)
How would you attach event to dynamically generated content such as li, div? Many elements are dynamically created based on user action. Something like search result, carousel, or other kind of tool where you have next, prev button generally add content dynamically to the container.
Usually one may thing of adding… (Continue)