Friday, November 11, 2011

How to use jQuery in Orchard CMS modules?


On the top of cshtml file put following code:
@{
    Script.Require("jQuery");
}
@using(Script.Foot()) {
    <script type ="text/javascript">
    //<![CDATA[
        $(document).ready(function () {
            alert('page loaded');
        });
    //]]>
    </script>
}

No comments:

Post a Comment