2012-08-03 4 views
2

jquery의 끌어서 놓기 기능을 사용하고 있습니다. 그 파이어 폭스에서 잘 작동하지만 크롬과 ie9에서 실패합니다.Jquery 크롬에서 끌어서 놓기가 작동하지 않습니다.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<meta name="language" content="en" /> 
<script src="http://code.jquery.com/jquery-latest.js"></script> 
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> 
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> 
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery-ui-1.8.2.custom.min.js"></script> 
여기

내 드래그 앤 데서 코드 : 사전에

$(function() { 
    $(".item").draggable({ 
      revert: true 
    }); 
    $("#mail-circle-wraper").droppable({ 
      tolerance: 'touch', 
      over: function() { 

        $(this).removeClass('out').addClass('over'); 
      }, 
      out: function() {   
       $(".item").draggable({ 
        revert: false 
      }); 
        $(this).removeClass('over').addClass('out'); 
      }, 
      drop: function() { 
        bootbox.confirm("Add this person to circle ?", function(confirmed) { 

         // do somthing 
        }); 

        $(this).removeClass('over').addClass('out'); 
      } 
    }); 
}); 

감사합니다 :)

+0

우리는 드래그 앤 드롭하고 무엇을 당신이 얻고 있다는 것입니다 특정 오류 코드를 볼 수 있을까요? –

+0

jquery 및 UI의 버전 때문에 이런 일이 발생 했습니까? –

답변

1

봅니다 아래

내가 사용하고 JQuery와 lib 디렉토리의 버전입니다 jquery 라이브러리를 다음으로 변경 :

https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js 

https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js 

언제든지 알려주세요.

+0

예. 그것은 나를 위해 일했다. 감사합니다 – abhis

1

모든 브라우저에서 작동하므로 다음 2 개의 라이브러리를 추가하십시오. 나는 그것을 시험했다.

Jquery.min.js

Jquery-ui.min.js

+0

thanks @ mrugen-ramani – Marin

관련 문제