Skip to content

Commit

Permalink
Replace csi.js with custom function (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
notGabo authored Jan 29, 2025
1 parent b04631d commit 8a4d317
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 0 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@ <h1>Getting Started with JavaFX</h1>
</div>
</div>
</div>
<!-- Script to include html -->
<!-- TODO: Check for Chrome compatibility -->
<!-- TODO: hyperlinks doesn't get styled in their files -->
<script src="https://cdn.jsdelivr.net/gh/LexmarkWeb/[email protected]/csi.min.js"></script>
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
Expand Down
9 changes: 9 additions & 0 deletions js/gluon.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,13 @@ $(function() {
function replaceAll(str, find, replace) {
return str.split(find).join(replace);
}

// for `<div data-include=..>` to include html files
$(function () {
var includes = $('[data-include]');
$.each(includes, function () {
var file = $(this).data('include');
$(this).load(file);
});
});
});

0 comments on commit 8a4d317

Please sign in to comment.