jQuery SVG-object tag load event
问题 I have a page which dynamically adds SVGs to the page via jQuery: grid.append($('<object>') .load(function () { // do stuff alert('loaded') }) .attr({ id: 'tile', type: 'image/svg+xml', width: Math.round(tile_w), height: Math.round(tile_h), data: 'map/base.svg' }) ); I need access to the SVG document (to "push" a variable into the svg script context) but the SVG has to be loaded for that. My problem is that I dont get the load event working. No alert is displayed. How to do? Edit: It seems