Note that there are some explanatory texts on larger screens.

plurals
  1. POError with mustache and jquery?
    primarykey
    data
    text
    <p>I am using mustache within a jquery widget calling external json/template. My Jquery seems fine. however mutstache is giving me a error. Script as follows:</p> <blockquote> <p>TypeError: this.tail.search is not a function<br> [Break On This Error]</p> </blockquote> <pre><code>var match, pos = this.tail.search(re); (function() { // Localize jQuery variable var jQuery; /******** Load LAB Js *********/ var script_tag = document.createElement('script'); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src", "js/LAB.min.js");//local if (script_tag.readyState) { script_tag.onreadystatechange = function () { // For old versions of IE if (this.readyState == 'complete' || this.readyState == 'loaded') { scriptLoadHandler(); } }; } else { // Other browsers script_tag.onload = scriptLoadHandler; } // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); /******** Load js as required ******/ function scriptLoadHandler() { var labjs = $LAB .script('http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js').wait() .script('js/mustache.js').wait();//local labjs.wait(function(){ main(); }); } /******** main function ********/ function main() { jQuery = window.jQuery.noConflict(true); jQuery(document).ready(function($) { function jsonHandler(data){ $.get('templates/template.html',function(template){ console.log(data); console.log(template); var htmlRenderer = Mustache.to_html(template,data); }); } $.getJSON('json/data.json',jsonHandler); }); //alert('end'); }//main() done })();//function done </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload