 
     # Dynamath
     @$('input.math').keyup(@refreshMath)
-    @$('input.math').each (index, element) =>
-      MathJax.Hub.Queue [@refreshMath, null, element]
+    if MathJax?
+      @$('input.math').each (index, element) =>
+        MathJax.Hub.Queue [@refreshMath, null, element]
 
   updateProgress: (response) =>
     if response.progress_changed

    $(selector, @el)

  bind: =>
    @el.find('.problem > div').each (index, element) =>
      MathJax.Hub.Queue ["Typeset", MathJax.Hub, element]

    window.update_schematics()


    preprocessor_tag = "inputtype_" + elid
    mathjax_preprocessor = @inputtypeDisplays[preprocessor_tag]

    if MathJax? and jax = MathJax.Hub.getAllJax(target)[0]
      eqn = $(element).val()
      if mathjax_preprocessor
        eqn = mathjax_preprocessor(eqn)
