Closed grantmcwilliams closed 11 years ago
All you have to do is create a div with and ID and call the Repo.js function on that div. You have to make sure the included Repo.js file is AFTER the regular jQuery file as well. After that just drop this in and it should work fine:
$('#div_name').repo({ user: 'your_github_username', name: 'your_github_repository_name' });
Thanks, I assume we have to let our site know where the code is though. It won't go searching the internet looking for the Repo.js function. Do we do a <script src=> and point to the Repo.js on github or should we download it locally. Also since I'm trying to do this inside Joomla 2.5 I should make sure jQuery is being used currently as well.
Yeah you have to add it to the Joomla assets folder (not sure where that is as I have never used Joomla) and call it in your
like any other JS file, just make sure you have it after the call to jQuery. I tend to use the google jquery, but you can use a local version as well.//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
How to do we call this plugin? It seems we need to call the Repo.js script from our site and/or include the code ourselves correct?
I'm trying to get this into a joomla article so I can display a repo there instead of dealing with managing files on the joomla site.
I guess what I'm asking is more than the one line examples showing what I need to do to use Repo.js.