Improving javascript part for new UX "showon"