Show More
@@ -576,16 +576,20 b' define(["widgets/js/manager",' | |||||
576 | return elements; |
|
576 | return elements; | |
577 | }, |
|
577 | }, | |
578 |
|
578 | |||
579 |
typeset: function( |
|
579 | typeset: function(element, text){ | |
580 |
// after (optionally) updating a selection's |
|
580 | // after (optionally) updating a node(list) or jQuery selection's | |
581 | // MathJax is available and typeset it |
|
581 | // text, check if MathJax is available and typeset it | |
|
582 | var $el = element.jquery ? element : $(element); | |||
|
583 | ||||
582 | if(arguments.length > 1){ |
|
584 | if(arguments.length > 1){ | |
583 | $el.text(text); |
|
585 | $el.text(text); | |
584 | } |
|
586 | } | |
585 | if(!window.MathJax){ |
|
587 | if(!window.MathJax){ | |
586 | return; |
|
588 | return; | |
587 | } |
|
589 | } | |
588 | return MathJax.Hub.Queue(["Typeset", MathJax.Hub, $el.get(0)]); |
|
590 | return $el.map(function(){ | |
|
591 | return MathJax.Hub.Queue(["Typeset", MathJax.Hub, this]); | |||
|
592 | }); | |||
589 | }, |
|
593 | }, | |
590 | }); |
|
594 | }); | |
591 |
|
595 |
General Comments 0
You need to be logged in to leave comments.
Login now