Code for this page:
<head>
<title>UI Controls example</title>
<script src="../../jmol/Jmol.js" type="text/javascript"></script> <!-- -->
</head>
<body>
<form>
<script type="text/javascript">
jmolInitialize("../../jmol"); //
jmolSetAppletColor("skyblue"); // if you don't want black
jmolApplet(200, "load ../jssample0/caffeine.xyz"); /*
"load ../../jmol/models/caffeine.xyz"
*/
jmolBr();
jmolHtml("atoms ");
// a radio group:
jmolRadioGroup([
["spacefill off", "off"],
["spacefill 20%", "20%", "checked"],
["spacefill 100%", "100%"]
]);
jmolBr();
// a button:
jmolButton("reset", "Reset to original orientation");
jmolBr();
// a checkbox:
jmolCheckbox("spin on", "spin off", "spin");
jmolBr();
// a link:
jmolLink("move 360 0 0 0 0 0 0 0 2", "Rotate once about the x axis");
jmolBr();
// a menu:
jmolMenu([
"background white",
["background skyblue", null, "selected"],
"background yellow",
"background salmon",
"background palegreen",
"background black"
]);
</script>
</form>
</body> |