2012-10-11 4 views
0

나는 jquery 슬라이더를 사용하여 레코드를 클릭 한 다음 닫으면 다시 닫습니다. 슬라이딩 슬라이더를 사용하면 문제가됩니다. 그것을 두 번 기록하면 자기 자신과 오류의 힙을 만들어 동일한 정보를로드하려고합니다 .. 그래서 내가 모든 데이터를 deelte하고 슬라이더 창을 가로 질러 건너편으로 이동하는 데 사용할 수있는 코드를 찾았습니다. 그것은 모든 세부 사항을 지우는 것처럼 보이지만 슬라이더 창은 전혀 움직이지 않습니다. 자바 스크립트 코드를 여기에 넣으십시오. 누군가가 코드와 함께 잘못된 일을하고 가능한 경우 수정하는 방법을 말해 줄 수 있습니다.div 데이터를 지우고 슬라이더를 숨기기

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() 
    } 

이 버튼은 tr 기능

<button style="position: absolute; top:40px; right:25px;" href="#" id="bt-close" class="<? echo $Stu_id;?>" onClick="deleteParentElement()">Close</button> 

답변

0

igger 당신은 그 문제 아마 ...이 세미콜론과

$(document).ready(function(){ 
//the rest of the code 
}); 

를 실종하고

내가 2 반 coloumns 덕분에 넣어 neeed 할
+0

? $ ('. student') 이후 – Matthew

+0

. remove(); and e.stopPropagation(); ... jquery에서 remove()와 같은 명령을 실행할 때마다 parent(). hide()와 같은 명령의 끝이 아닌 한 그 뒤에 세미콜론이 필요합니다. .. 이것은 또한 $ (document) .ready (function() { // 나머지 코드 }와 같은 이벤트 hadlers를 위해 간다. – NinJoel