JSFiddle - React, Tailwind, and code Playground

by rwaldron

HTML

<script src="https://dl.dropbox.com/u/3531958/jquery.js"></script>
<p>jQuery 1.8 fail to delegate mouse event on 'use' element in IE9, but 'circle' is fine. Replace 'use' with 'circle' in javascript, find out what's the difference in IE9.</p>

<svg width="200" height="200">
    <defs>
        <circle id="my-circle" cx="50" cy="50" r="50" />
    </defs>
    <use fill="red" xlink:href="#my-circle" />
</svg>

CSS

svg {
    border :1 px;
}

JavaScript

$('svg').on('click', 'use', function(e){   //'use' failed in IE9
        console.log(this);
        console.log(e.target);
});