MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Jquery to website  (Mono Support )

Viewed 3706 time(s), 2 post(s) 4/14/2014 3:51:18 PMby Samtg
Samtg

Samtg

4/14/2014 3:51:18 PM
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
This content has not been rated yet. 
440 Reputation 38 Total posts
iruzak

iruzak

4/15/2014 6:41:03 AM
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
This content has not been rated yet. 
443 Reputation 50 Total posts