I posted a question next() not working and gota reply which is working fine, but can somebody explain me what exactly is going on here:
$(this).closest('tr').next('tr').find("img.cc").toggle()
.closest('tr').siblings('tr').find("img.cc").hide();
1.)
$(this).closest('tr')This line jumps to 1.)
2.)
.next('tr')We’re arriving at 2.)
3.)
.find("img.cc")Now, we hopefully found element at 3.)
4.)
.toggle()We switch visibilty from element 4.) (visible/hidden)
5.)
.closest('tr')We jump back to the closest parent
tr6.)
siblings('tr')We receive all
tr'smarked with 6.)7.)
.find("img.cc").hide();Find the
img.ccwithin all siblingstr's-> 6.)and hide them.