This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI({filter:"raw"}).use("overlay", | |
function(Y) { | |
var o = new Y.Overlay({ | |
width:300, | |
height:300, | |
align: { | |
node:"#location_inp", | |
points:["tl", "bl"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en-us"> | |
<head> | |
<title>YUI Autocomplete with Prompt</title> | |
<script src="http://yui.yahooapis.com/3.3.0pr1/build/yui/yui.js"></script> | |
<script> | |
// A Prompt Plugin for AutoComplete. It can be used with the AutoComplete Plugin, | |
// as in this example, or directly with AutoCompleteList |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head></head> | |
<body> | |
<button id="btn">Go</button> | |
<script> | |
var runner; | |
function Runner(n) { | |
this.n = n; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<body> | |
<script type="text/javascript"> | |
setTimeout(function() { | |
var ran = false; | |
function startTest() { | |
if (!ran) { | |
ran = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testSingleBoxDestroy: function() { | |
(function(origRemove) { | |
Y.Node.prototype.remove = function() { | |
if (this._node) { | |
origRemove.apply(this, arguments); | |
} | |
} | |
})(Y.Node.prototype.remove); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="radio"> | |
<div class="hd">Header</div> | |
<div class="bd"> | |
<form id="rform"> | |
<label><input type="radio" name="foo" value="1"> Hi-diddle-ee-dee...</label> | |
<button>I’m a button, and I should get focus if my preceding <input> is not checked.</button> | |
<label><input type="radio" name="foo" value="2" checked="checked"> a sailor’s life...</label> | |
<label><input type="radio" name="foo" value="3"> for me!</label> | |
</form> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI({filter:"raw"}).use('dump', 'scrollview-base', function(Y) { | |
// Workaround, need to roll support for "axis" into out-of-the-box product | |
Y.ScrollView.prototype._uiDimensionsChange = function() { | |
var sv = this, | |
bb = sv._bb, | |
CLASS_NAMES = Y.ScrollView.CLASS_NAMES, | |
height = sv.get('height'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Example: Adding A Context Menu To A Table (YUI Library)</title> | |
<!-- Standard reset and fonts --> | |
<link rel="stylesheet" type="text/css" href="../../build/reset/reset.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
var content = scrollView.get("contentBox"); | |
// Roll my own delegate to work around Chrome 12 issue (if you need click support that is). | |
content.on("click", function(e) { | |
// For mouse based devices, we need to make sure the click isn't fired | |
// at the end of a drag/flick. We're use 2 as an arbitrary threshold. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Utility method to obtain scrollWidth, scrollHeight, | |
* accounting for the impact of translate on scrollWidth, scrollHeight | |
* @method _getScrollDims | |
* @returns {Array} The scrollWidth and scrollHeight as an array: [scrollWidth, scrollHeight] | |
* @private | |
*/ | |
_getScrollDims: function() { | |
var dims, | |
matrix, |