I have a js file that I am including in my WordPress template. Is there a way to get access to the ‘$’ function inside my ‘MediaBrowser’ object without having to clumsily pass it around as an argument?
Thanks,
Steve
var MediaBrowser = {
initialize:function($){
$("a[rel^='mediaBrowser']").prettyPhoto();
}
};
jQuery(document).ready(function($){
MediaBrowser.initialize($);
});
1 Answer