javascript - selecting next element with class in table -


i have task list in table 3 columns , multiple rows. in column 1 have checkbox. in column 2 have text , in column 3 have date , 2 icons hidden initially. when checkbox clicked add class row in clicked checkbox contained. class marks item "done". adding class alone not enough, want show 2 icons hidden initially. want show 2 on row in clicked checkbox contained.

have been fooling around next , parent , rest of family not successfully.

any on sweet!

at moment have jquery wise this

$('.task-checkbox').click(function() {   $(this).closest('tr').toggleclass('task-done');   $(this).parent().next('.done-n-delete-icons').toggle(); }); 

created jsfiddle here http://jsfiddle.net/zf7hh/1/

else , no need toggle other class, use 1 applied tr :

.task-done .done-n-delete-icons {     display:block; } 

demo


with external ressource fixed : demo


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -