google apps script - CSS In HTML Services Template -
i'm getting started gas html services. having bit of problem figuring out put css (i'm sure simple). below simple code example. in trying set background color. correct way set , organize it?
//code.gs function doget() { return htmlservice.createtemplatefromfile("index").evaluate(); } //index.html <style> body { background-color:#e5e6e8; } </style> <html> <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery- ui.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"> </script> <body> <a href = "#" id = "index1" class = "anchor">i index1</a> <a href = "#" id = "index2" class = "anchor">i index2a</a> <div id="div">1</div> <script>$(document).ready(function() { $("#index1").click(function() { $("#div").append("2"); $("#index1").hide(); }); });</script> </body> </html>
style tag should go inside html tag.
//index.html <html> <style> body { background-color:#e5e6e8; } </style> <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery- ui.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"> </script> <body> <a href = "#" id = "index1" class = "anchor">i index1</a> <a href = "#" id = "index2" class = "anchor">i index2a</a> <div id="div">1</div> <script>$(document).ready(function() { $("#index1").click(function() { $("#div").append("2"); $("#index1").hide(); }); });</script> </body> </html>