fixed onclick binding
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
// All code in this file is licensed under the ISC license, provided in LICENSE.txt
|
||||
$('#update').click(function () {
|
||||
updateData();
|
||||
});
|
||||
$('#update').click(updateData);
|
||||
// jQuery event binder
|
||||
|
||||
function updateData () {
|
||||
@@ -28,8 +26,8 @@ function graphSpectralData (obj, dom) {
|
||||
graphXTicks.push([i, specter[i]]);
|
||||
}
|
||||
const options = {
|
||||
grid: {color: 'white'},
|
||||
xaxis: {ticks: graphXTicks}
|
||||
grid: { color: 'white' },
|
||||
xaxis: { ticks: graphXTicks }
|
||||
};
|
||||
$.plot('#graph', [graphPoints], options);
|
||||
// flot expects an array of arrays (lines) of 2-element arrays (points)
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<button id="update" class="btn btn-primary">Get data</button>
|
||||
<button id="update" onclick="updateData()" class="btn btn-primary">Get data</button>
|
||||
<button id="download" class="btn btn-primary">Download</button>
|
||||
<button id="debug" class="btn btn-danger">DEBUG</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
|
||||
Reference in New Issue
Block a user