mirror of https://github.com/Kozea/pygal.git
Florian Mounier
13 years ago
8 changed files with 65 additions and 163 deletions
@ -0,0 +1,24 @@
|
||||
$(function () { |
||||
$('figure figcaption').append( |
||||
$('<button>') |
||||
.text('⟳') |
||||
.click(function() { |
||||
var $fig, $embed, w, h, src; |
||||
$fig = $(this).closest('figure'); |
||||
$embed = $fig.find('embed'); |
||||
w = $embed.width(); |
||||
h = $embed.height(); |
||||
src = $embed.attr('src'); |
||||
$embed.remove(); |
||||
$fig.prepend( |
||||
$('<embed>') |
||||
.attr({ |
||||
src: src, |
||||
type: 'image/svg+xml', |
||||
width: w, |
||||
height: h |
||||
}) |
||||
); |
||||
}) |
||||
); |
||||
}); |
Loading…
Reference in new issue