overrides.html revision 344be5ef8d439ed67340cce47cdf334300aa4e64
<!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>Simple IE style overrides problem</title>
<style id="styleoverrides" type="text/css">
html {
background: #dfb8df; /* purple */
}
</style>
<!--
<script type="text/javascript" src="http://yui.yahooapis.com/3.1.0pr2/build/yui/yui-debug.js"></script>
-->
<script type="text/javascript" src="/build/yui/yui-debug.js"></script>
<script type="text/javascript">
YUI({
// filter: 'debug', // apply a filter to load the raw or debug version of YUI files
insertBefore: 'styleoverrides', // The insertion point for new nodes
modules: { // one or more external modules that can be loaded along side of YUI
'yui2-resetcss': {
fullpath: "http://yui.yahooapis.com/2.8.0r4/build/reset/reset-min.css",
type: 'css'
}
}
}
// ).use('node','yui2-resetcss', function(Y) {
).use('node','cssreset', 'cssfonts', function(Y) {
var node = Y.one('#demo p');
var onClick = function(e) {
var tag = e.target.get('parentNode.tagName'); // e.target === node || #demo p em
e.currentTarget.one('em').setContent('I am a child of ' + tag + '.'); // e.currentTarget === node
};
node.on('click', onClick);
var h = document.getElementsByTagName('head')[0],
children = h.childNodes,
len = children.length, i = 0, child;
for (; i<len; i++) {
child = children[i];
Y.log('child: ' + child.tagName + ', ' + child.id);
}
var over = document.getElementById('styleoverrides'),
p = over.parentNode;
// p.removeChild(over);
// p.appendChild(over);
// document.body.style.zoom = 1;
});
</script>
</head>
<body >
<div id="demo">
<p><em>Click me.</em></p>
</div>
</body>
</html>