我有以下文字,根据封闭/可变变量的状况,推倒了集装箱倒塌和另一 up,反之亦然。
文字在火ox中操作,然而,在IE和Mook,它只是表面上的工作:
谁能建议?
许多人感谢! 页: 1
(The OCH var takes the height of a continer which elements are loaded into via ajax, so it then knows when to open it again how many px to open to - is this the best way?)
$(document).ready(function()
{
//Grab the height of the container after its loaded with all the calls in...
var och = $( #calls ).height();
//Are we allowed to close this panel yet?
var enabled = false;
//is the panel closed or not?
var closed = false;
$(".survey-description").click(function () {
if (enabled == true) {
if (closed == false) {
$(this).closest("#calls").stop().animate({"height": "44px"}, "fast");
closed = true;
}
else {
$(this).closest("#calls").stop().animate({"height": och}, "medium");
closed = false;
}
}
});
$(".linktoCall").click(function () {
if (closed == false) {
//Now we can toggle the top panel...
enabled = true;
$(this).closest("#calls").stop().animate({"height": "44px"}, "fast");
closed = true;
}
});
});
这里的EDIT是所提供内容的约html。
<div id="survey-description"></div>
<div id="calls">
<div>
<p onclick="showCall( tgkn5xabgnivkaf );" id="notstarted" class="linktoCall">59677 tgkn5xabgnivkaf<br>NOT STARTED - SAVED</p>
</div>
</div>
<div id="aCall">
</div>