select the check boxes

36 views
Skip to first unread message

JPW

unread,
Jan 22, 2017, 12:03:06 PM1/22/17
to Flot graphs
I would like to create a function that selects the check boxes with the function:

function Tempcoche(){
   
for(y = 0; y < choices.childElementCount; y++){
       
if (y<10){
            choices
.children[y].checked=true
       
}else{
            choices
.children[y].checked=false
       
}
   
}
    $
('plotAccordingToChoices()');
}
 But I can not refresh the graph.

    $('plotAccordingToChoices()') does not give anything.

How should I do it?

Ced

unread,
Jan 23, 2017, 4:17:37 AM1/23/17
to Flot graphs
This is jQuery syntax used to select elements in an HTML document. See jQuery documentation.
$('selector')

This is how you call a javascript function, which I think is what you're trying to do.
plotAccordingToChoices()

But instead what you have written is this, which is not going to work.
$('plotAccordingToChoices()')
Reply all
Reply to author
Forward
0 new messages