我有一个生成网格数据的 php 函数,看起来类似于:
<div id="_gridData">
<div class="ui-grid-b">
<div class="ui-block-a mobile-grid-header"> </div>
<div class="ui-block-b mobile-grid-header date-block">Time</div>
<div class="ui-block-c mobile-grid-header number-block">Meal Type</div>
<div class="ui-block-a ">
<a id="delete_id_84" class="mp-delete-link ui-btn ui-btn-up-c ui-shadow ui-btn-corner-all ui-btn-icon-notext" data-iconpos="notext" data-icon="delete" data-role="button" href="" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="c" title="Delete"><span class="ui-btn-inner ui-btn-corner-all"><span class="ui-btn-text">Delete</span><span class="ui-icon ui-icon-delete ui-icon-shadow"> </span></span></a></div>
<div class="ui-block-b date-block "><a id="edit_id_84" class="mp-edit-link ui-link" data-ajax="false" href="">02:00 AM</a></div>
<div class="ui-block-c date-block ">Lunch</div>
</div>
</div>
但是,当我使用 ajax 调用相同的函数来获取相同的数据时,它看起来像这样:
<div id="_gridData">
<div class="ui-grid-b">
<div class="ui-block-a mobile-grid-header"> </div>
<div class="ui-block-b mobile-grid-header date-block">Time</div>
<div class="ui-block-c mobile-grid-header number-block">Meal Type</div>
<div class="ui-block-a ">
<a id="delete_id_84" class="mp-delete-link" data-iconpos="notext" data-icon="delete" data-role="button" href="">Delete</a></div>
<div class="ui-block-b date-block "><a id="edit_id_84" class="mp-edit-link" data-ajax="false" href="">02:00 AM</a></div>
<div class="ui-block-c date-block ">Lunch</div>
</div>
</div>
请注意,我丢失了附加到锚标记的所有额外类。
它使这个网格:
看起来像这样:
所以我的删除数据图标不见了。
我知道我在按钮和选择菜单等对象上调用“刷新”:
$('#_mealTime').val('');
$('#_mealTime').selectmenu("refresh");
我需要对锚标签进行类似的调用吗?