This file contains 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('lang', function (Y) { | |
YAP.toQueryString = function (obj, name) { | |
switch (Y.Lang.type(obj)) { | |
case 'undefined': | |
case 'null': | |
return name ? encodeURIComponent(name) + '=' : ''; | |
case 'boolean': obj = +obj; // intentional fallthrough | |
case 'number': | |
case 'string': |
This file contains 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> | |
<head> | |
<script> | |
// The signature is pure coincidence ;) | |
function L(U,C){var d=document,f='firstChild',r='readyState',h=d.documentElement[f],s=d.createElement('script'),m=s[r]:'onreadystatechange':'';s.type='text/javascript';s.src=U;s[m||'onload']=function(){if(!m||/loaded|complete/.test(s[r])){s[m]=null;C()}};h.insertBefore(s,h[f]);} | |
// async loading of javascript files, starting asap. | |
L("http://example.com/example.js",function () { | |
doSomething(); |
This file contains 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
<script type="text/javascript" src="frameworks/yui_2.7.0b/yui/build/yuiloader/yuiloader-debug.js"></script> | |
<script type="text/javascript" src="js/loader-config.js"></script> | |
<script type="text/javascript"> | |
(function() { | |
_yuiloader_config.config.onSuccess = function () { | |
}; | |
_yuiloader_config.config.onFailure = function () { | |
}; | |
var loader = new YAHOO.util.YUILoader(_yuiloader_config.config); |
This file contains 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> | |
<head> | |
<meta http - equiv = "content-type"content = "text/html; charset=utf-8"> | |
<title>Server - side Pagination and Sorting for Dynamic Data </title> | |
<link rel="stylesheet" type="text/css " href="datatable2.css " /> | |
<script type="text / javascript " src="js / yahoo - dom - event.js "></script> | |
<script type="text / javascript " src="js / connection - min.js "></script> | |
<script type="text / javascript " src="js / dragdrop - min.js "></script> | |
<script type="text / javascript " src="js / dom - min.js "></script> |
This file contains 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
/** | |
* The History Lite utility is similar in purpose to the YUI Browser History | |
* utility, but with a more flexible API, no initialization or markup | |
* requirements, limited IE6/7 support, and a much smaller footprint. | |
* | |
* @module history-lite | |
*/ | |
/** | |
* @class HistoryLite |
This file contains 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 CLASS_NAME = "className", | |
BOUNDING_BOX = "boundingBox", | |
SKIN_PREFIX = "yui-skin-", | |
SKIN_REGEXP = new RegExp("(?:^|\\s)" + SKIN_PREFIX + "(\S+)"); | |
... | |
getActiveSkin : function() { | |
var match; | |
this.get(BOUNDING_BOX).ancestor( |
This file contains 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 inputs = Y.all( 'input' ); | |
inputs.on( 'focus', function ( e ) { | |
// NodeList subscriptions use the NodeList as 'this' | |
this === inputs; // true | |
// because you can always get to the node from the event's currentTarget, | |
// but can't get to the NodeList unless you've prefetched it like in this ex | |
e.currentTarget.get( 'tagName' ) === 'INPUT'; // true | |
} ); |
This file contains 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
/** | |
* DOM Ready | |
*/ | |
Y.on('domready',function(e){ | |
// code | |
}); | |
/** | |
* DOM Basics | |
*/ |
This file contains 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
Button = Y.Base.create('toolbar-button',Y.Widget,[Y.WidgetChild],{ | |
BOUNDING_TEMPLATE : '<li/>', | |
CONTENT_TEMPLATE : '<button/>', | |
_clickHandle : null, | |
className : '', | |
initializer : function(config) { | |
this.className = this.getClassName(); | |
}, | |
This file contains 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.add('example',function(Y){ | |
var Example= function(){ | |
Example.superclass.constructor.apply(this,arguments); | |
}; | |
Y.extend(Example, Y.Overlay,{ | |
/* proto */ | |
},{ |
OlderNewer