If I use @section scripts
in partial view. page is not rendering script. But If remove @section scripts
js rendering to the page. What is the difference? Can't I use directly <Script>
in partialviews? not good practice?
@section scripts
{
<script type="text/javascript">
$("#SideMenu > li").each(function () {
//Find the inner element with active class
$(this).find('.active').removeClass('active');
});
</script>
}