我有使用 slideToggle() jQuery 函数。如果我单击按钮,它会向下滑动,但在 Firefox 和 IE 中它会在几分之一秒内消失。但它在铬中正常工作。我在它旁边使用了三到四个 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">
<input type="hidden" name="optForm" value="mythought">
<input type="button" name="opt_back" id="opt_back" value="Back" style='width:100px;'> <input type="submit" name="submitOptMyThought" id="submitOptMyThought" value="Save" style='width:100px;'> <input type="button" name="later" id="later" value="Fill it Later" style='width:100px;'>
</div>