Toggle navigation
Run LIVE DEMO
Show CODE
LIVE DEMO PAGE
Updated: 19.06.18 11:07
Loading from files example
<!DOCTYPE html> <html> <head> <title>A very simple smartapp2.js example</title> <!-- jQuery --> <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script> <!-- Bootstrap --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> <!-- Smartapp --> <script src="/downloads/jquery.smartapp2.js"></script> </head> <body> <div id="AppContainer"></div> <script> $(function() { // Initialize app on a DOM container element var $app = $("#AppContainer").smartapp2(); // Register a view on URL #View1 (will be default view, as it is registered first) $app.createView("View1", $app.fetch("/Views/Views/View1.html")); // Register a view on URL #View2 $app.createView("View2", $app.fetch("/Views/Views/View2.html")); // Register a view on URL #View3 $app.createView("View3", $app.fetch("/Views/Views/View3.html")); // Run the application $app.run(); }); </script> </body> </html>