livequery 在 IE8 中不工作
$('.DrpDwn option').livequery(function () {
$(this).each(function () {
$(this).addClass("DrpDwnItm");
});
});
$(function () {
// updates Contract Id dropdown upon selection
$(".DrpDwnItm").live('mouseover', function () {
alert("text");
});
});
我已经尝试过:
$(function () {
// updates Contract Id dropdown upon selection
$(".DrpDwnItm").live('hover', function () {
alert("text");
});
});
这在 FireFox 中工作正常。但IE8不行。我试图向每个选项标签添加一个类,其中选择标签有一个名为 DrpDwn 的类。任何人都可以提供任何想法来解释为什么吗?感谢
HTML 标记。
<table id="wrkshtpar" >
<tr>
<th colspan="3">REMAINING STOCKPILE
</th>
</tr>
<tr>
<th>
Qty
</th>
<th>
Rem %
</th>
<th>
StkPl %
</th>
</tr>
<tr>
<td class="hidden">
<input id="WorkSheetDetails_0__MyWorkSheetPartials_0__SeqID" name="WorkSheetDetails[0].MyWorkSheetPartials[0].SeqID" type="hidden" value="3" />
<input id="WorkSheetDetails_0__MyWorkSheetPartials_0__ComponetLabel" name="WorkSheetDetails[0].MyWorkSheetPartials[0].ComponetLabel" type="hidden" value="REMAINING STOCKPILE" />
<input id="WorkSheetDetails_0__MyWorkSheetPartials_0__ComponetId" name="WorkSheetDetails[0].MyWorkSheetPartials[0].ComponetId" type="hidden" value="0" />
</td>
<td>
<label for="WorkSheetDetails_0__MyWorkSheetPartials_0__PartialQty">0</label>
</td>
<td>
<input id="WorkSheetDetails_0__MyWorkSheetPartials_0__RemainingPercentage" name="WorkSheetDetails[0].MyWorkSheetPartials[0].RemainingPercentage" type="hidden" value="0.50" />
<label for="WorkSheetDetails_0__MyWorkSheetPartials_0__RemainingPercentage">50.00 %</label>
</td>
<td>
<input id="WorkSheetDetails_0__MyWorkSheetPartials_0__StkPileSeqId" name="WorkSheetDetails[0].MyWorkSheetPartials[0].StkPileSeqId" type="hidden" value="1" />
</td>
</tr>
<tr>
<td class="hidden">
<input id="WorkSheetDetails_1__MyWorkSheetPartials_0__SeqID" name="WorkSheetDetails[1].MyWorkSheetPartials[0].SeqID" type="hidden" value="4" />
<input id="WorkSheetDetails_1__MyWorkSheetPartials_0__ComponetLabel" name="WorkSheetDetails[1].MyWorkSheetPartials[0].ComponetLabel" type="hidden" value="REMAINING STOCKPILE" />
<input id="WorkSheetDetails_1__MyWorkSheetPartials_0__ComponetId" name="WorkSheetDetails[1].MyWorkSheetPartials[0].ComponetId" type="hidden" value="0" />
</td>
<td>
<input id="WorkSheetDetails_1__MyWorkSheetPartials_0__PartialQty" name="WorkSheetDetails[1].MyWorkSheetPartials[0].PartialQty" size="5" type="text" value="400" />
</td>
<td>
<input id="WorkSheetDetails_1__MyWorkSheetPartials_0__RemainingPercentage" name="WorkSheetDetails[1].MyWorkSheetPartials[0].RemainingPercentage" type="hidden" value="0.50" />
<label for="WorkSheetDetails_1__MyWorkSheetPartials_0__RemainingPercentage">50.00 %</label>
</td>
<td>
<select class="DrpDwn" id="WorkSheetDetails_1__MyWorkSheetPartials_0__StkPileSeqId" name="WorkSheetDetails[1].MyWorkSheetPartials[0].StkPileSeqId"><option selected="selected" value="1">50.00 %</option>
<option value="-1">100.00 %</option>
</select> </td>
</tr>
<tr>
<td class="hidden">
<input id="WorkSheetDetails_2__MyWorkSheetPartials_0__SeqID" name="WorkSheetDetails[2].MyWorkSheetPartials[0].SeqID" type="hidden" value="5" />
<input id="WorkSheetDetails_2__MyWorkSheetPartials_0__ComponetLabel" name="WorkSheetDetails[2].MyWorkSheetPartials[0].ComponetLabel" type="hidden" value="REMAINING STOCKPILE" />
<input id="WorkSheetDetails_2__MyWorkSheetPartials_0__ComponetId" name="WorkSheetDetails[2].MyWorkSheetPartials[0].ComponetId" type="hidden" value="0" />
</td>
<td>
<input id="WorkSheetDetails_2__MyWorkSheetPartials_0__PartialQty" name="WorkSheetDetails[2].MyWorkSheetPartials[0].PartialQty" size="5" type="text" value="100" />
</td>
<td>
<input id="WorkSheetDetails_2__MyWorkSheetPartials_0__RemainingPercentage" name="WorkSheetDetails[2].MyWorkSheetPartials[0].RemainingPercentage" type="hidden" value="1" />
<label for="WorkSheetDetails_2__MyWorkSheetPartials_0__RemainingPercentage">100.00 %</label>
</td>
<td>
<select class="DrpDwn" id="WorkSheetDetails_2__MyWorkSheetPartials_0__StkPileSeqId" name="WorkSheetDetails[2].MyWorkSheetPartials[0].StkPileSeqId"><option value="1">50.00 %</option>
<option selected="selected" value="-1">100.00 %</option>
</select> </td>
</tr>
<tr>
<td class="hidden">
<input id="WorkSheetDetails_3__MyWorkSheetPartials_0__SeqID" name="WorkSheetDetails[3].MyWorkSheetPartials[0].SeqID" type="hidden" value="0" />
<input id="WorkSheetDetails_3__MyWorkSheetPartials_0__ComponetLabel" name="WorkSheetDetails[3].MyWorkSheetPartials[0].ComponetLabel" type="hidden" value="REMAINING STOCKPILE" />
<input id="WorkSheetDetails_3__MyWorkSheetPartials_0__ComponetId" name="WorkSheetDetails[3].MyWorkSheetPartials[0].ComponetId" type="hidden" value="0" />
</td>
<td>
<input id="WorkSheetDetails_3__MyWorkSheetPartials_0__PartialQty" name="WorkSheetDetails[3].MyWorkSheetPartials[0].PartialQty" size="5" type="text" value="0" />
</td>
<td>
<input id="WorkSheetDetails_3__MyWorkSheetPartials_0__RemainingPercentage" name="WorkSheetDetails[3].MyWorkSheetPartials[0].RemainingPercentage" type="hidden" value="0" />
<label for="WorkSheetDetails_3__MyWorkSheetPartials_0__RemainingPercentage">0.00 %</label>
</td>
<td>
<select class="DrpDwn" id="WorkSheetDetails_3__MyWorkSheetPartials_0__StkPileSeqId" name="WorkSheetDetails[3].MyWorkSheetPartials[0].StkPileSeqId"><option value="1">50.00 %</option>
<option value="-1">100.00 %</option>
</select> </td>
</tr>
</table>
$('.DrpDwn option').livequery(function () {
$(this).each(function () {
$(this).addClass("DrpDwnItm");
});
});
$(function () {
// updates Contract Id dropdown upon selection
$(".DrpDwnItm").live('mouseover', function () {
alert("text");
});
});
I've tried:
$(function () {
// updates Contract Id dropdown upon selection
$(".DrpDwnItm").live('hover', function () {
alert("text");
});
});
This is working fine in FireFox. but does not work IE8. I'm trying to add a class to each option tag where the select tag has a class named DrpDwn. Can anyone provide any ideas has to why? Thanks
HTML MarkUp.
<table id="wrkshtpar" >
<tr>
<th colspan="3">REMAINING STOCKPILE
</th>
</tr>
<tr>
<th>
Qty
</th>
<th>
Rem %
</th>
<th>
StkPl %
</th>
</tr>
<tr>
<td class="hidden">
<input id="WorkSheetDetails_0__MyWorkSheetPartials_0__SeqID" name="WorkSheetDetails[0].MyWorkSheetPartials[0].SeqID" type="hidden" value="3" />
<input id="WorkSheetDetails_0__MyWorkSheetPartials_0__ComponetLabel" name="WorkSheetDetails[0].MyWorkSheetPartials[0].ComponetLabel" type="hidden" value="REMAINING STOCKPILE" />
<input id="WorkSheetDetails_0__MyWorkSheetPartials_0__ComponetId" name="WorkSheetDetails[0].MyWorkSheetPartials[0].ComponetId" type="hidden" value="0" />
</td>
<td>
<label for="WorkSheetDetails_0__MyWorkSheetPartials_0__PartialQty">0</label>
</td>
<td>
<input id="WorkSheetDetails_0__MyWorkSheetPartials_0__RemainingPercentage" name="WorkSheetDetails[0].MyWorkSheetPartials[0].RemainingPercentage" type="hidden" value="0.50" />
<label for="WorkSheetDetails_0__MyWorkSheetPartials_0__RemainingPercentage">50.00 %</label>
</td>
<td>
<input id="WorkSheetDetails_0__MyWorkSheetPartials_0__StkPileSeqId" name="WorkSheetDetails[0].MyWorkSheetPartials[0].StkPileSeqId" type="hidden" value="1" />
</td>
</tr>
<tr>
<td class="hidden">
<input id="WorkSheetDetails_1__MyWorkSheetPartials_0__SeqID" name="WorkSheetDetails[1].MyWorkSheetPartials[0].SeqID" type="hidden" value="4" />
<input id="WorkSheetDetails_1__MyWorkSheetPartials_0__ComponetLabel" name="WorkSheetDetails[1].MyWorkSheetPartials[0].ComponetLabel" type="hidden" value="REMAINING STOCKPILE" />
<input id="WorkSheetDetails_1__MyWorkSheetPartials_0__ComponetId" name="WorkSheetDetails[1].MyWorkSheetPartials[0].ComponetId" type="hidden" value="0" />
</td>
<td>
<input id="WorkSheetDetails_1__MyWorkSheetPartials_0__PartialQty" name="WorkSheetDetails[1].MyWorkSheetPartials[0].PartialQty" size="5" type="text" value="400" />
</td>
<td>
<input id="WorkSheetDetails_1__MyWorkSheetPartials_0__RemainingPercentage" name="WorkSheetDetails[1].MyWorkSheetPartials[0].RemainingPercentage" type="hidden" value="0.50" />
<label for="WorkSheetDetails_1__MyWorkSheetPartials_0__RemainingPercentage">50.00 %</label>
</td>
<td>
<select class="DrpDwn" id="WorkSheetDetails_1__MyWorkSheetPartials_0__StkPileSeqId" name="WorkSheetDetails[1].MyWorkSheetPartials[0].StkPileSeqId"><option selected="selected" value="1">50.00 %</option>
<option value="-1">100.00 %</option>
</select> </td>
</tr>
<tr>
<td class="hidden">
<input id="WorkSheetDetails_2__MyWorkSheetPartials_0__SeqID" name="WorkSheetDetails[2].MyWorkSheetPartials[0].SeqID" type="hidden" value="5" />
<input id="WorkSheetDetails_2__MyWorkSheetPartials_0__ComponetLabel" name="WorkSheetDetails[2].MyWorkSheetPartials[0].ComponetLabel" type="hidden" value="REMAINING STOCKPILE" />
<input id="WorkSheetDetails_2__MyWorkSheetPartials_0__ComponetId" name="WorkSheetDetails[2].MyWorkSheetPartials[0].ComponetId" type="hidden" value="0" />
</td>
<td>
<input id="WorkSheetDetails_2__MyWorkSheetPartials_0__PartialQty" name="WorkSheetDetails[2].MyWorkSheetPartials[0].PartialQty" size="5" type="text" value="100" />
</td>
<td>
<input id="WorkSheetDetails_2__MyWorkSheetPartials_0__RemainingPercentage" name="WorkSheetDetails[2].MyWorkSheetPartials[0].RemainingPercentage" type="hidden" value="1" />
<label for="WorkSheetDetails_2__MyWorkSheetPartials_0__RemainingPercentage">100.00 %</label>
</td>
<td>
<select class="DrpDwn" id="WorkSheetDetails_2__MyWorkSheetPartials_0__StkPileSeqId" name="WorkSheetDetails[2].MyWorkSheetPartials[0].StkPileSeqId"><option value="1">50.00 %</option>
<option selected="selected" value="-1">100.00 %</option>
</select> </td>
</tr>
<tr>
<td class="hidden">
<input id="WorkSheetDetails_3__MyWorkSheetPartials_0__SeqID" name="WorkSheetDetails[3].MyWorkSheetPartials[0].SeqID" type="hidden" value="0" />
<input id="WorkSheetDetails_3__MyWorkSheetPartials_0__ComponetLabel" name="WorkSheetDetails[3].MyWorkSheetPartials[0].ComponetLabel" type="hidden" value="REMAINING STOCKPILE" />
<input id="WorkSheetDetails_3__MyWorkSheetPartials_0__ComponetId" name="WorkSheetDetails[3].MyWorkSheetPartials[0].ComponetId" type="hidden" value="0" />
</td>
<td>
<input id="WorkSheetDetails_3__MyWorkSheetPartials_0__PartialQty" name="WorkSheetDetails[3].MyWorkSheetPartials[0].PartialQty" size="5" type="text" value="0" />
</td>
<td>
<input id="WorkSheetDetails_3__MyWorkSheetPartials_0__RemainingPercentage" name="WorkSheetDetails[3].MyWorkSheetPartials[0].RemainingPercentage" type="hidden" value="0" />
<label for="WorkSheetDetails_3__MyWorkSheetPartials_0__RemainingPercentage">0.00 %</label>
</td>
<td>
<select class="DrpDwn" id="WorkSheetDetails_3__MyWorkSheetPartials_0__StkPileSeqId" name="WorkSheetDetails[3].MyWorkSheetPartials[0].StkPileSeqId"><option value="1">50.00 %</option>
<option value="-1">100.00 %</option>
</select> </td>
</tr>
</table>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论