Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 21 lines (18 sloc) 0.58 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<!DOCTYPE html>
<title>Fading an Element in Response to a Click</title>
<style>
#demo { width: 100px; height: 100px; border: 1px #000 solid; background: #d72; }
</style>

<button id="hide">Hide</button> <button id="show">Show</button>
<div id="demo"></div>

<script src="http://yui.yahooapis.com/3.5.0/build/yui/yui-min.js"></script>
<script>
YUI().use('node', 'transition', function (Y) {
    Y.one('#hide').on('click', function () {
        Y.one('#demo').hide(true);
    });

    Y.one('#show').on('click', function () {
        Y.one('#demo').show(true);
    });
});
</script>
Something went wrong with that request. Please try again.