       """
 
     update: (mathml)->
-      mathml_in_tag = @wrappedMathTag(mathml)
-      elem = MathJax.Hub.getAllJax(@figure[0])[0]
-      if elem
-        MathJax.Hub.Queue(["Text", elem, mathml_in_tag])
+      @mathml_renderer.render(@figure, @wrappedMathTag(mathml))
 
   class_mixer(MathMLDisplay)
 

#= require almond_wrapper
#= require lib
#= require jquery

ttm.define 'widgets/ui_elements', ['lib/class_mixer'], (class_mixer)->
  class Button
    initialize: (@opts={})->
    render: (opts={})->

      opts.element.append @figure
      @figure

    wrappedMathTag: (content)->
      """
      <math xmlns=\"http://www.w3.org/1998/Math/MathML\">
