css - Filter using Checkboxes -


i have website: http://ba.nowcommu.myhostpoint.ch/table.html

as can see, have 2 tables. need, if possible, hide , display tables in same position using checkboxes "table 1" , "table 2".

i think have put 2 tables in same <div>, what?

how can this?

you few ways here pops mind:

give each table individual id (id="table1" , id="table2").

then create 2 checkboxes , give them unique id's.

$('#checkbox1').on('click', function(event) {   $('#table1').toggle($('#checkbox1').is(":checked")); }); $('#checkbox2').on('click', function(event) {   $('#table2').toggle($('#checkbox2').is(":checked")); }); 

you more dynamic javascript if understand question correctly should work.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -