yui3

yui or yui3

Is YUI3 ready mature enough? What are its advantages and disadvantes vs YUI ...

How do I get the select box values in YUI 3?

In YUI 3 I have a node that is my select box: Y.get('#regionSelect'); How do I get the <option> values that are currently selected (even if there are more than one?) Also, is there a tutorial out there that tells me explicitly how to do this (I don't want to serialize a whole form)? ...

Javascript Selectbox refresh necessary in YUI 3, when selecting none?

Hi all, I'm using YUI 3 to let someone click "Select All" or "Select None" and then have the selectbox select all the items or unselect all of them, respectively. Here's my code: // This selects all Y.on('click',function (e) { selectBoxNode.get("options").each(function () { this.removeAttribute('selected'...

YUI 3 programmatically fire change event

Hi all, I was wondering how to programmatically fire a change event with YUI3 -- I added a change listener to one select box node: Y.get('#mynode').on('change', function(e) { Alert(“changed me”); }); and somewhere else in the script want to fire that event. It works, of course, when a user changes the select box value in the browser...

YUI 3 Selector for multiple class names

Hello, I have a bunch of divs like this: <div class="bear"></div> <div class="dog"></div> How do I get a nodelist that includes all divs with class of bear and dog? I tried: Y.get(".bear .dog").each(function() { }); But it returns null. Anyone have any suggestions? Thanks! ...

Replacement for YUI grids in YUI3?

YUI3 deprecated cssgrids, but I don't see a replacement API on the site. How does one layout grids when using YUI3 (in future -- for now, I can use yui2 grids of course)? ...

Catch Javascript syntax errors while using YUI3

I'm using slightly modified sample code provided by the YUI team. When my source responds with something other than JSON (or just has a JSON syntax error) my browser (Safari) aborts script processing, preventing me from notifying the user there was a problem. I'm definitely no JS guru, so this code may be a lot uglier than it has to be....

YUI3 calling a function

top.on('click', function(){ anim.run(); }); I have an anim function, and was wondering why I can't call it like this top.on('click', anim.run); ...

What's the best way to call a function in YUI3 only if a series o XHR (IO) requests are successful?

I guess this question isn't only specific to YUI, but that's the JS library I'm using and a specific answer would be helpful. Basically when loading a page, I want a script to run a few XHRs using Y.io, and if they all return the data successfully then I want the script to move on to the next step, which will manipulate the data receive...

synchronized animations in YUI3?

Is it possible in yui3 to synchronize multiple animations so they progress together? Something similar to what is mentioned in the jquery 1.4 roadmap and demonstrated in this example http://ejohn.org/files/sync. ...

jQuery 1.4 vs YUI3, which one to choose?

jQuery 1.4 vs YUI3, which to use and why? ...

How to pass arguments to YUI3's 'on' method callbacks?

I have 2 event handlers: Y.all(".ptl").on("mouseover", handleOverlay); Y.all(".ptl").on("mouseout", handleOverlay); And I would like to pass an arugment to handleOverlay on mouseout so that the function knows that the user has exited the node and to exit the handleOverlay function. I have attemped to follow the API http://developer...

Please explain in detail this part of YUI3 CSS Reset..

What is the usefulness of these 2 things in CSS reset? What is the problem in resizing of input elements in IE and in which version? and if legend color doesn't inherit in IE then how it can be solved adding color:#000; /*to enable resizing for IE*/ input, textarea, select { *font-size:100%; } /*because legend doesn't inherit in I...

How do I call a basic YUI3 function from within a normal JavaScript function?

I'd like to call a simple YUI3 function from within a JavaScript function. Here is some code that does what I want in a very verbose way: function changeContent (message) { YUI().use("node", function(Y) { Y.all('#content-div').setContent(message); }); } Is there a better way to do this? NOTE: I don't want to attach th...

Use jQuery to select, then use YUI to animate? Good idea?

jQuery's animation engine isn't working well for me. It doesn't have easing and color animation built-in, and the plugins I am using for them don't work properly together consistently. I've had good experience with YUI's animation engine in the past. Is it possible to use jQuery to select items, and then use YUI to animate them? Here's ...

In YUI3 why does Y.one return null?

I've got a webpage that validates as XHTML 1.0 Strict. I'm using YUI3 and I'm using the seed-file-based instantiation. In several places in my javascript code, I'm doing something like: YUI().use("node", function(Y){ var node = Y.one("#my_element_id"); }); It works great, cross-platform, cross-browser, etc. in almost every case. How...

Customize YUI 3 tabview Skin

hi, I want to customize the YUI tab view control and looking for some documentation to understand the default skin and need some idea to customize the skinning (yui-skin-sam). Thanks ...

YUI3 Tabview Initialization

I'm trying to setup a simple tabview from existing markup, ala this example from the YUI developer network. Works like a charm. However, my question is, how do you designate which of the tabs should be initially selected? Can it be done via the existing markup, or is the only way via javascript? This isn't really addressed in the example...

Issues subscribing to YUI2 DataTable events using 2in3

Does anyone know if there are any known issues subscribing to events fired by a YUI2 DataTable when using with YUI3 2in3? I'm trying to do the following and it's not working: myDataTable.subscribe("initEvent", function(){ Y.log('******** hello from initEvent'); }); Other features of the DataTable seem to be working but I can't s...

ASP.NET Page.User is null during AJAX request

I'm using the MVC2 framework and one of my views has a bit of conditional logic that gets the Page.User.Identity object and does a comparison with other values to determine what to display. That all works fine on the initial page load, but when I make an AJAX call to get partial page updates (I'm doing this all manually with YUI3, not t...