Skip to content

Commit

Permalink
Remove jquery from magna charta
Browse files Browse the repository at this point in the history
- had to include an option for testing to return a reference to the object, in order not to have to completely rewrite the tests
- at least one test was redundant so have removed, others have been modified
  • Loading branch information
andysellick committed Aug 27, 2020
1 parent 71f4772 commit d1e9f00
Show file tree
Hide file tree
Showing 3 changed files with 316 additions and 286 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ window.GOVUK = window.GOVUK || {};

for (var i = 0; i < $barcharts.length; i++) {
var $table = $barcharts[i]
// magna charta is a jquery plugin so we have to pass a jquery object to it
$.magnaCharta($($table), { toggleText: 'Change between chart and table' })
new GOVUK.Modules.MagnaCharta().start($table, { toggleText: 'Change between chart and table' })
$table.classList.add('js-barchart-table-init')
}
}
Expand Down
Loading

0 comments on commit d1e9f00

Please sign in to comment.