UNPKG

brite

Version:

DOM Centric Minimalistic MVC Framework

52 lines (38 loc) 1.74 kB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>briteUITest - brite</title> <!-- ****** Generic Test Includes ****** --> <link rel="stylesheet" href="css/test.css"/> <link rel="stylesheet" href="../others/bootstrap/css/bootstrap.css" /> <!-- only brite.js dependency --> <script type="text/javascript" src="../js-dependencies/jquery.js" ></script> <!-- include the brite.min.js in prod --> <script type="text/javascript" src="../dist/brite.js" ></script> <!-- some test utilities --> <script type="text/javascript" src="../others/handlebars.min.js" ></script> <script type="text/javascript" src="js/main.js" ></script> <!-- ****** /Generic Test Includes ****** --> <script type="text/javascript" src="js/HelloView.js"></script> <script type="text/javascript"> $(function(){ $("#helloButton").on("click",function(){ brite.display("HelloView","#HelloWorld-Container",{name:"Mike"}); }); }); </script> </head> <body> <h2>brite Hello World</h2> <h3>Hello World</h3> <button id="helloButton">Display Hello World</button> <div id="HelloWorld-Container" style="margin: 30px;border: solid 1px #dddddd;height: 30px"> </div> <!-- ********* Handlebars Inline Template ********* --> <script id="tmpl-HelloView" type="text/html"> <div style='position:absolute'>Hello... {{name}} ({{count}})</div> </script> <!-- ********* /Handlebars Inline Template ********* --> </body> </html>