Skip to content

Commit

Permalink
Merge pull request #1637 from alphagov/less-vulnerable-barcharts
Browse files Browse the repository at this point in the history
Make barchart govspeak enhancement resilient to re-initialisation
  • Loading branch information
kevindew authored Feb 21, 2019
2 parents facb957 + 38f9280 commit 6e85bf0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
function govspeakBarcharts() {
$('.govuk-govspeak .js-barchart-table').each(function() {
$('.govuk-govspeak .js-barchart-table:not(.mc-chart):not(.js-barchart-table-init)').each(function() {
$.magnaCharta($(this), {
toggleText: "Change between chart and table"
});
$(this).addClass('js-barchart-table-init')
})
}
$(govspeakBarcharts);

0 comments on commit 6e85bf0

Please sign in to comment.