<?php js::set('type', $type)?> <script> $(function() { $('#<?php echo $type?>').addClass('active'); }) </script>