I have two(at least,they can be more) identical divs that contain two input element.
I want with the click of an icon to hide always the last of them...I use this:
There is a problem here,after the last div is hidden clicking the icon subsequently does not hide the last visible div...the above expression always target the last div visible or not.The purpose here is to hide always the last visible element.
Take a look at an example:fiddle
click the minus icon