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 )

8463 put(a) pogledan, 2 odgovor(a) 14.4.2014. 15:51:18Kreirao(la) Samtg
Samtg

Samtg

14.4.2014. 15:51:18
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
Ovaj sadržaj još nije ocijenjen. 
440 Reputacija 38 Ukupno objava
iruzak

iruzak

15.4.2014. 6:41:03
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
Ovaj sadržaj još nije ocijenjen. 
443 Reputacija 50 Ukupno objava