我一直在研究一个jquery滑块,一旦点击一条记录就滑出来然后当你点击关闭它滑回屏幕..我原来的问题是,如果我点击两次记录,它会尝试加载相同的信息在它自己和创建大量的错误..所以我发现一些代码,我可以用来推动所有数据,然后移动滑块窗格回到屏幕上的问题我有它是擦除所有细节像我不会,但滑块窗格根本没有移动我只在这里放了javascript代码,看看是否有人可以告诉我什么我做错了代码以及如果可能的话如何解决它...
function deleteParentElement(){
$(this).parent().animate({right:-1000}); // on its own as an onlcick event
attached to the button it works on its own the pane its moving class is called "details"
$('.student').remove() //the class defined in here is only the div containing the data
e.stopPropagation()
}
这是用于触发功能的按钮
<button style="position: absolute; top:40px; right:25px;" href="#" id="bt-close" class="<? echo $Stu_id;?>" onClick="deleteParentElement()">Close</button>
答案 0 :(得分:0)
你缺少两个分号和一个
$(document).ready(function(){
//the rest of the code
});
......这可能是你的问题