Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 88 lines (67 sloc) 1.857 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
<!DOCTYPE HTML>
<html>

<head>

    <title>Event ordering</title>

    <style>
        div#outer {
            width: 400px;
            height: 300px;
            border: solid 2px black;
        }

        div#inner {
            width: 80%;
            height: 80%;
            border: solid 2px black;
        }

        div#innerinner {
            width: 80%;
            height: 80%;
            border: solid 2px black;
        }

    </style>
</head>

<body>

<div id="outer" tabindex="-1">
    This is the outer div.

    <div id="inner" tabindex="-1">
        This is the inner div.
        <div id="innerinner" tabindex="-1">
            This is the innerinner div
        </div>
    </div>

</div>

<script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script>

<script>
    $(document).ready(function () {
        $('div#outer').click(function (e) {
            console.log("outer.click");
        });
        $('div#outer').focus(function (e) {
            console.log("outer.focus");
        });
        $('div#outer').focusin(function (e) {
            console.log("outer.focusin");
        });

        $('div#inner').click(function (e) {
            console.log("--inner.click");
        });
        $('div#inner').focus(function (e) {
            console.log("--inner.focus");
        });
        $('div#inner').focusin(function (e) {
            console.log("--inner.focusin");
            e.stopPropagation();
        });

        $('div#innerinner').click(function (e) {
            console.log("----innerinner.click");
        });
        $('div#innerinner').focus(function (e) {
            console.log("----innerinner.focus");
        });
        $('div#innerinner').focusin(function (e) {
            console.log("----innerinner.focusin");
        });

    });
</script>

</body>

</html>



Something went wrong with that request. Please try again.