Can I use jQuery or JavaScript code in partial views?
I have a grid in my partial view and I am trying to hide one grid element using jQuery in that partial view. I am not able to do so. But same code works if I use it without a partial view.
Can anybody help me out?
Here is my code
<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<NascoBenefitBuilder.ViewModels.Obn.ProductTemplate.ObnProductTemplateMainData>" %>
<script type = "text/javascript" language="javascript">
$(document).ready(function(){
alert("success");
});
</script>
This code is in my partil view but when this page loads I am not able to popup this alert box.
thanks Thanks
language="javascript"and if that doesn't work trying taking thealert()outside the$(document).readyevent.