Javascript
Gameforest includes a handful of JavaScript to help bring some of our components to life. Learn more about how to include it, bootstrap data and programmatic API options, and more.
Individual or compiled
Plugins can be included individually or all at once using theme.js or the minified theme.min.js but don’t include both. Include the JavaScript files on your page by adding them before to the </body> section.
<!-- vendor js -->
<script src="plugins/jquery/jquery-3.2.1.min.js"></script>
<script src="plugins/popper/popper.min.js"></script>
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
<!-- theme js -->
<script src="js/theme.min.js"></script>
Add Plugins
Add custom javascript plugins to the site before </body> and theme.min.js. Upload to plugin sources into the plugins folder and include it in your html page.
<!-- vendor js -->
<script src="plugins/jquery/jquery-3.2.1.min.js"></script>
<script src="plugins/popper/popper.min.js"></script>
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
<!-- plugins js -->
<script src="plugins/**/*.js"></script>
<!-- theme js -->
<script src="js/theme.min.js"></script>
Also note that all plugins depend on jQuery this means jQuery must be included before the plugin files.
