asp.net mvc 4 - ASP: execute jquery function in C# -
so quick question: execute jquery function in view.
i have function
function dosomething() { $('#page'). ... }); }
only when @if (tempdata["check"] != null) { ... function should called.
in examples can find online function can either called (document).ready function or pressing button.
my question: how dou execute jquery dhtml
i using mvc4 razor
is you're looking for:
in html portion of page:
<script> $(document).ready(function() ... }); </script>
?
make sure you're loading jquery file somewhere in page's dom. adding
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
right above opening script tag above should suffice.
Comments
Post a Comment