隐藏/显示 jquery 在 IE 中不起作用
我有一个选择菜单,当单击选项时显示/隐藏“livetransopts”div。在 Firefox、Chrome 等中工作正常,但在 IE 中不行,任何人都可以帮助我吗???
<select>
<option class="hidelivetrans" value="No">No - Don't transfer the call</option>
<option class="showlivetrans" value="Yes">Yes - Transfer the call</option>
</select>
</div>
</div>
<!--Live transfer yes/no field-->
<script type="text/javascript">
$(document).ready(function() {
$('.livetransopts').hide();
$(".showlivetrans").click(function(){
$(".livetransopts").show('slow');
});
$(".hidelivetrans").click(function(){
$(".livetransopts").hide('slow');
});
});
</script>
<!--live trans opts-->
<div class="livetransopts">
<!--content here-->
</div>
I have a select menu that shows/hides the "livetransopts" div when an option is clicked. Works fine in Firefox, Chrome etc but not in IE can anyone help me????
<select>
<option class="hidelivetrans" value="No">No - Don't transfer the call</option>
<option class="showlivetrans" value="Yes">Yes - Transfer the call</option>
</select>
</div>
</div>
<!--Live transfer yes/no field-->
<script type="text/javascript">
$(document).ready(function() {
$('.livetransopts').hide();
$(".showlivetrans").click(function(){
$(".livetransopts").show('slow');
});
$(".hidelivetrans").click(function(){
$(".livetransopts").hide('slow');
});
});
</script>
<!--live trans opts-->
<div class="livetransopts">
<!--content here-->
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正确的方法是将“更改”事件绑定到
The right way to do it would bind a "change" event to