我正在开发一个php页面,管理对一些酒吧的访问.... 现在我卡住了一个地狱的问题。ajax调用脚本后jquery不再工作
让我解释一下....
我有一个按钮,调用ajaxrequest和重装称为#entry 出现的问题,当我尝试访问#entry的疗法财产Ajax请求之后的特定股利。
HTML结构
<div id="all">
<div id="prenotazioni" class="mobile-left">
<? CController::renderpartial('_lista'); ?>
</div>
<div id="entry" class="mobile-right" style="width:280px;position:absolute;bottom:0px;right:0px;">
<? CController::renderpartial('_pren'); ?>
</div>
</div>
和有问题的jQuery代码的遵循
$(window).scroll(function() {
$("#all").parent("div").find("#entry").css("bottom","");
$("#all").parent("div").find("#entry").css("top", $(window).height() - $("#entry").outerHeight() + $(window).scrollTop() + "px");
});
,直到我叫AJAX everithing没有什么后正常工作......有人会帮我?????
感谢
EDITED
jQuery('body').undelegate('#yt0','click').delegate('#yt0','click',function(){jQuery.ajax({'type':'GET','data':{'id_lista':-1},'url':'/mobile/showlista','cache':false,'success':function(html){jQuery("#all").html(html)}});return false;});
_PREN
<div id="tipo"></div>
<input name="report[id_pren]" id="report_id_pren" type="hidden" value=""/>
<div id="ingresso">
<table>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td style="margin-right: 10px;">
<div class="male" >
<span id="male_nr" class="nr">0</span>
</div>
</td>
<td>
<div class="female">
<span id="female_nr" class="nr">0</span>
</div>
<div class="clear"></div>
</td>
</tr>
<tr>
<td style="line-height: 53px;">INGRESSI
<div id="totale_div" style="float:right;">
<span id="totale">0</span>
</div>
</td>
</td>
<td rowspan="2" style="text-align:right;"><input type="image" src="../images/mobile/invio.gif" /></td>
</tr>
<tr>
<td style="line-height: 53px;">
OMAGGI
<div id="omaggi_div" style="float:right;">
<span id="omaggi"> 0</span>
</div>
</td>
</tr>
<tr>
<td style="width:50px;">
<input type="button" id="omgplus" class="omgplus" />
<input type="button"id="omgminus" class="omgminus" />
</td>
</tr>
</table>
</div>
请过帐您的AJAX调用。 –
ajax调用html结构发生改变后有可能吗? – Samich
告诉我们如何加载ajax,以及如何在DOM中插入结果 –