12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>MathJax Dynamic Steps Test Page</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <script type="text/x-mathjax-config">
-
-
-
- MathJax.Hub.Config({
- displayAlign: "left",
- displayIndent: "2em"
- });
-
-
-
- MathJax.Hub.Queue(function () {
- document.getElementById("step").disabled = false;
- });
- </script>
- <script type="text/javascript" src="../MathJax.js?config=TeX-AMS_HTML-full"></script>
- <script type="text/javascript">
- (function () {
- var n = 1;
-
-
-
-
-
- window.ShowStep = function () {
- document.getElementById("Step"+n).style.visibility = "visible"; n++;
- if (!document.getElementById("Step"+n)) {document.getElementById("step").disabled = true}
- document.getElementById("reset").disabled = false;
- }
-
-
-
-
- window.ResetSteps = function () {
- document.getElementById("step").disabled = false;
- document.getElementById("reset").disabled = true;
- var i = 1, step; n = 1;
- while (step = document.getElementById("Step"+i)) {step.style.visibility = "hidden"; i++}
- }
- })();
- </script>
- <style>
- #Step1, #Step2, #Step3, #Step4, #Step5 {
- visibility: hidden;
- }
- h1 {
- background: #CCCCCC;
- padding: .2em 1em;
- border-top: 3px solid #666666;
- border-bottom: 3px solid #999999;
- }
- </style>
- </head>
- <body>
- <h1>Dynamic Equations in MathJax</h1>
- <blockquote>
- <p>
- Expand the following:
- \begin{align}
- (x+1)^2
- &\cssId{Step1}{= (x+1)(x+1)}\\
- &\cssId{Step2}{= x(x+1) + 1(x+1)}\\
- &\cssId{Step3}{= (x^2+x) + (x+1)}\\
- &\cssId{Step4}{= x^2 + (x + x) + 1}\\
- &\cssId{Step5}{= x^2+2x+1}\\
- \end{align}
- </p>
- <input type="button" onclick="ShowStep()" value="Show Next Step" id="step" disabled="true" />
- <input type="button" onclick="ResetSteps()" value="Reset" id="reset" disabled="true" />
- </blockquote>
- </body>
- </html>
|