Currently I have a website hosted on Github Pages that runs on Jekyll with a main index.html file as the homepage that links to pages written in markdown. I got the Fluidbox jQuery plugin to work correctly in HTML but not in my markdown files. I dropped the jQuery code in my footer which is loaded on every page:
<!-- Load jQuery -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<!-- Load plugins -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-throttle-debounce/1.1/jquery.ba-throttle-debounce.min.js"></script>
<script type="text/javascript" src="./fluidbox/js/jquery.fluidbox.min.js"></script>
<!-- JS Functions -->
<script>
$(function () {
// You can use any kind of selectors for jQuery Fluidbox
$("a[data-fluidbox]").fluidbox();
});
</script>
</footer>
I then use
<a href="path to image" data-fluidbox><img src="path to image" alt="" width="100%" height="auto"/></a>
to implement the plugin's effect on an image. This works in my HTML files not my Markdown files. How can I properly run a jQuery plugin in a Jekyll markdown file?