我有网站的主页,我在滚动事件中加载ajax
请求的内容。我使用mustache.js
添加mdl - cards。我想添加mdl - 菜单到卡片。滚动的第一个ajax
加载是有效的。但滚动后,添加卡mdl-menu
不起作用。为什么?
<div class="mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet mdl-cell--4-col- phone">
<div class='demo-card-wide demo-card-square mdl-card mdl-shadow--4dp'>
<div class='mdl-card__media' ></div>
<div class='mdl-card__title mdl-card--expand' style="background: url('{% templatetag openvariable %} image {% templatetag closevariable %}') center / cover;">
<h2 class='mdl-card__title-text'> {% templatetag openvariable %} title {% templatetag closevariable %} </h2>
</div>
<div class='mdl-card__supporting-text'>
{% templatetag openvariable %} description {% templatetag closevariable %}
</div>
<div class='mdl-card__menu'>
<div class="mdl-button--floating-action" style="position: relative; left: 45px; bottom: 35px;">
<button class="mdl-button mdl-menu--bottom-right mdl-js-button mdl-button--icon mdl-js-ripple-effect" id="{% templatetag openvariable %}id{% templatetag closevariable %}">
<i class="material-icons">keyboard_arrow_down</i>
<span class="mdl-ripple"></span>
</button>
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="{% templatetag openvariable %}id{% templatetag closevariable %}">
<li class="mdl-menu__item">
Share
<div class="mdl-button mdl-button--icon mdl-button--colored">
<i class="material-icons">share</i>
</div>
</li>
<li disabled class="mdl-menu__item">
Delete
<div disabled class="mdl-button mdl-button--icon mdl-button--colored">
<i class="material-icons">close</i>
</div>
</li>
</ul>
</div>
</div>
<div class='mdl-card__actions mdl-card--border'>
<a class='mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect' href='/posts/{% templatetag openvariable %}id{% templatetag closevariable %}'>
Подробнее
</a>
<div class="mdl-layout-spacer" align="center"></div>
<div class='mdl-card__supporting-text' align="right">{% templatetag openvariable %} pub_date {% templatetag closevariable %}</div>
</div>
</div>
</div>
那么,我该怎么办?