www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit ecbfb344c3092b48f089b8b2ac360fa9dfe0739c
parent 415be7eaf76f82186b962264b6f2c80e9477c12a
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Sat, 17 Oct 2015 23:36:13 -0400

Move event handler to maction element rather than duplication it in two places (for HTML-CSS output).

Diffstat:
Munpacked/jax/output/HTML-CSS/autoload/maction.js | 21+++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/unpacked/jax/output/HTML-CSS/autoload/maction.js b/unpacked/jax/output/HTML-CSS/autoload/maction.js @@ -92,25 +92,26 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { HTMLaction: { toggle: function (span,frame,selection) { this.selection = selection; - frame.onclick = span.childNodes[1].onclick = MathJax.Callback(["HTMLclick",this]); - frame.style.cursor = span.childNodes[1].style.cursor="pointer"; + span.onclick = MathJax.Callback(["HTMLclick",this]); + frame.style.cursor = span.childNodes[1].style.cursor = "pointer"; }, statusline: function (span,frame,selection) { - frame.onmouseover = span.childNodes[1].onmouseover = MathJax.Callback(["HTMLsetStatus",this]); - frame.onmouseout = span.childNodes[1].onmouseout = MathJax.Callback(["HTMLclearStatus",this]); - frame.onmouseover.autoReset = frame.onmouseout.autoReset = true; + span.onmouseover = MathJax.Callback(["HTMLsetStatus",this]); + span.onmouseout = MathJax.Callback(["HTMLclearStatus",this]); + span.onmouseover.autoReset = span.onmouseout.autoReset = true; + frame.style.cursor = span.childNodes[1].style.cursor = "default"; }, tooltip: function(span,frame,selection) { if (this.data[1] && this.data[1].isToken) { - frame.title = frame.alt = span.childNodes[1].title = - span.childNodes[1].alt = this.data[1].data.join(""); + span.title = span.alt = this.data[1].data.join(""); } else { - frame.onmouseover = span.childNodes[1].onmouseover = MathJax.Callback(["HTMLtooltipOver",this]); - frame.onmouseout = span.childNodes[1].onmouseout = MathJax.Callback(["HTMLtooltipOut",this]); - frame.onmouseover.autoReset = frame.onmouseout.autoReset = true; + span.onmouseover = MathJax.Callback(["HTMLtooltipOver",this]); + span.onmouseout = MathJax.Callback(["HTMLtooltipOut",this]); + span.onmouseover.autoReset = span.onmouseout.autoReset = true; } + frame.style.cursor = span.childNodes[1].style.cursor = "default"; } },