X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=gallery%2Fcolor-visibility.js;h=5e5cc96b9e58527d65612452baea3b1e3b722809;hb=91bd611cb031bf1f3d39650e3109135fd0e78791;hp=cf3e0e3245ae4f9e987c4d3ae8c12d77b18254db;hpb=795b16307db2a673ba7aa3452f6f6b0e93baeb3a;p=dygraphs.git diff --git a/gallery/color-visibility.js b/gallery/color-visibility.js index cf3e0e3..5e5cc96 100644 --- a/gallery/color-visibility.js +++ b/gallery/color-visibility.js @@ -1,3 +1,5 @@ +/*global Gallery,Dygraph,data,$ */ +/*jshint unused:false */ Gallery.register( 'color-visibility', { @@ -27,8 +29,9 @@ Gallery.register( visibility: [true, true, true] }); - function change(el) { - g.setVisibility(el.id, el.checked); - } + $('input[type=checkbox]').click(function() { + var el = this; + g.setVisibility(el.id, el.checked); + }); } });