zarino / plot-a-graph-tool

A ScraperWiki tool for making graphs out of datasets.
0 stars 2 forks source link

Ascending / Descending checkboxes don't work consistently #10

Closed zarino closed 11 years ago

zarino commented 11 years ago

When one of the checkboxes is selected, and then you check the other one, the chart doesn't update as you'd expect. Instead, it shows the old sort order.

This is because these two events are competing, and sometimes the second one wins:

$(document).on('change', '.mutually-exclusive :checkbox', function(){
  if(this.checked){ $(this).siblings(':checked').attr('checked', false) }
})
...
$('section select, section :checkbox').on('change', refreshChart)