Mono Support Jquery to website 

Viewed 8320 time(s), 2 post(s), 4/14/2014 3:51:18 PM - by Samtg
4/14/2014 3:51:18 PM
440 Reputation 38 Total posts

Hi,
     I got another question.  Is there a special way to add jquery to a page in MonoX structure, because I have tried adding to modules, html editor, and aspx pages with little success.

Thanks for any help.

-Sam

1
4/15/2014 6:41:03 AM
443 Reputation 50 Total posts

Hi SAMTG,
could you please explain what exactly are you trying to do?
You want to add some JQuery code on a page? You can do that like this:

$(document).ready(function () {
    myFunction();
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    if (prm != null) {
        prm.add_endRequest(function (s, e) {
            myFunction();
        });
    }
     
    function myFunction() {
        // JQuery code
    }
});
You want to include some JS library on a page? You can do that like this:
ScriptManager.GetCurrent(this.Page).Scripts.Add(new ScriptReference("script.js"));
Regards,
Igor

2
This is a demo site for MonoX. Please visit Mono Software for more info.