You can traverse through the control with the help of next().Please have a look on the following example.I have created this by keeping your jsbn example in mind.
$(function () {
$("select").change(function() {
if (this.value !== "0") {
$(this).next().show();
} else {
$(this).next().hide();
}
});
})