jQuery slideToggle()在firefox和IE中不起作用,但它在Chrome中运行良好

时间:2013-03-09 12:10:20

标签: jquery

我使用了slideToggle()jQuery函数。如果我点击按钮它向下滑动但它会在firefox和IE中消失一小段时间。但它在chrome中正常工作。我在侧面使用了三到四个div和一个提交按钮。这是问题吗?请帮忙。请检查吹码。

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script> 
$(document).ready(function(){
$("#moreqts").hide();
$("#continue_filling").click(function(){
$("#moreqts").slideToggle("slow");
});
});
</script>


<form action="<?php $this->form->getAction(); ?>" method="post" style="<?php echo $mythoughtOptForm; ?>">
<div>
<p id="continue_filling">Continue filling</p>
</div>
<div id="moreqts">
<div class="food"><table border="1px"><tr style="width:200px; text-align:center;"><td></td><td>Road Side</td><td>Indian</td><td>Fine Dining</td><td>Chinese</td><td>Thai</td><td>Continental</td><td>Italian</td></tr>
<tr><td style="width:90px;">Places to eat</td><td><div class="field">
    <?php echo $this->form->places_junk_food->renderViewHelper(); ?>
</div></td><td><div class="field">
    <?php echo $this->form->places_indian->renderViewHelper(); ?>
</div></td><td><div class="field">
    <?php echo $this->form->places_fine_dining->renderViewHelper(); ?>
</div></td><td><div class="field">
    <?php echo $this->form->places_chinese->renderViewHelper(); ?>
</div></td><td><div class="field">
    <?php echo $this->form->places_thai->renderViewHelper(); ?>
</div></td><td><div class="field">
    <?php echo $this->form->places_continental->renderViewHelper(); ?>
</div></td><td><div class="field">
    <?php echo $this->form->places_italian->renderViewHelper(); ?>
</div></td></tr>   
</table></div>
    <div class="sub-field">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="hidden" name="optForm" value="mythought">
    <input type="button" name="opt_back" id="opt_back" value="Back" style='width:100px;'>&nbsp;<input type="submit" name="submitOptMyThought" id="submitOptMyThought" value="Save" style='width:100px;'>&nbsp;<input type="button" name="later" id="later" value="Fill it Later" style='width:100px;'>

</div>

1 个答案:

答案 0 :(得分:0)

如果它是HTML5,请使用<!doctype html>,因为我只看到src=""没有使用type=text/javascript