Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 胡子包括模板_Jquery_Html_Mustache - Fatal编程技术网

Jquery 胡子包括模板

Jquery 胡子包括模板,jquery,html,mustache,Jquery,Html,Mustache,我是新来的胡子,我正在一个网站上工作,已经在使用它。我在这个网站的文件夹里有一套小胡子模板。它们在主html中使用Sekizai标记进行调用,如下所示: <html> <head>...</head> ... <body> {% block body_content %}{% endblock %} {% mustachejs "dashboard_module" %} {% mustachejs "dashboard_

我是新来的胡子,我正在一个网站上工作,已经在使用它。我在这个网站的文件夹里有一套小胡子模板。它们在主html中使用Sekizai标记进行调用,如下所示:

<html>
<head>...</head>
...
<body>

    {% block body_content %}{% endblock %}

    {% mustachejs "dashboard_module" %}
    {% mustachejs "dashboard_add_module" %}
    {% mustachejs "dashboard_empty_module" %}
    {% mustachejs "login_popup" %}
    {% mustachejs "add_account_types_popup" %}
    {% mustachejs "add_account_manual_popup" %}
    {% mustachejs "add_account_success_popup" %}
    {% mustachejs "chart_linearprogress" %}
    {% mustachejs "adviser_popover" %}

        {% mustachejs "add_event_popup" %}

</body>
</html>
当然,myfunc()中的内容不起作用!我该怎么做呢?

找到了:

var template = Mustache.template('add_event_popup').render(null);
function my func(){
            var evnt_btn = $('.add-evnt-btn');
            var template;
            // get mustache template
        template = $( Mustache.render( 'add_event_popup' ));

            evnt_btn.click(function(){

                template.show();
            });
}
var template = Mustache.template('add_event_popup').render(null);