<script> $(function() { $('.submenu ul li.active').parents('.submenu').addClass('vision') }); </script>