How to run JQuery code and external libraries that have been part of my website

I am trying to create an app for my existing site and trying to add all JQuery code and use external libraries like Lightbox, Slider, etc within my app.

I was hoping if guys could tell me (may be with an example) that is it a different way to run JQuery code when the app is ready or am I missing something.

You might have guessed; totally newbie.

I’d love to post the code, but it’s just jumbled up. I’d be grateful if you can provide some example.

These work though:-

jQuery("body ion-side-menus").addClass("Added");
jQuery("body ion-nav-view").addClass("Added");

but if I go further down the document, it doesn’t work, for e.g.

I tried these (these all work in Console):-

//works in console. Doesn't work through code    

//works in console. Doesn't work through code    
 jQuery("body ion-side-menus").addClass("ACLASS");