2017-01-20 5 views
0

내 사이트 www.HighGamer.com/AOInternational 결제 게이트웨이 모달을 표시하는 신용 ​​/ 직불/기프트 카드가있는 지불 옵션을 입력했지만 입력 필드를 클릭하려고 할 때 지불 정보는 타이핑을 허용하는 대신 draggable으로 바뀝니다.draggable 모달의 입력 필드를 클릭 할 수 없음

모달 코드를 변경하지 않고 드래그 할 수 없도록 해킹 할 수있는 해킹이 있습니까 아니면 드래그 기능을 유지하면서 입력 필드의 잠금을 해제 할 수있는 방법이 있습니까? 선배 들께 감사드립니다.

나는 모달로 드래그 여기

내가 그것을

//load draggables on tukibox 
    $(".tukibox").drags(); 


// Simple JQuery Draggable Plugin 
// https://plus.google.com/108949996304093815163/about 
// Usage: $(selector).drags(); 
// Options: 
// handle   => your dragging handle. 
//      If not defined, then the whole body of the 
//      selected element will be draggable 
// cursor   => define your draggable element cursor type 
// draggableClass => define the draggable class 
// activeHandleClass => define the active handle class 
// 
// Update: 26 February 2013 
// 1. Move the `z-index` manipulation from the plugin to CSS declaration 
// 2. Fix the laggy effect, because at the first time I made this plugin, 
// I just use the `draggable` class that's added to the element 
// when the element is clicked to select the current draggable element. (Sorry about my bad English!) 
// 3. Move the `draggable` and `active-handle` class as a part of the plugin option 
// Next update?? NEVER!!! Should create a similar plugin that is not called `simple`! 

(function($) { 
    $.fn.drags = function(opt) { 

     opt = $.extend({ 
      handle: "", 
      cursor: "move", 
      draggableClass: "draggable", 
      activeHandleClass: "active-handle" 
     }, opt); 

     var $selected = null; 
     var $elements = (opt.handle === "") ? this : this.find(opt.handle); 

     $elements.css('cursor', opt.cursor).on("mousedown", function(e) { 
      if(opt.handle === "") { 
       $selected = $(this); 
       $selected.addClass(opt.draggableClass); 
      } else { 
       $selected = $(this).parent(); 
       $selected.addClass(opt.draggableClass).find(opt.handle).addClass(opt.activeHandleClass); 
      } 
      var drg_h = $selected.outerHeight(), 
       drg_w = $selected.outerWidth(), 
       pos_y = $selected.offset().top + drg_h - e.pageY, 
       pos_x = $selected.offset().left + drg_w - e.pageX; 
      $(document).on("mousemove", function(e) { 
       $selected.offset({ 
        top: e.pageY + pos_y - drg_h, 
        left: e.pageX + pos_x - drg_w 
       }); 
      }).on("mouseup", function() { 
       $(this).off("mousemove"); // Unbind events from document 
       if ($selected !== null) { 
        $selected.removeClass(opt.draggableClass); 
        $selected = null; 
       } 
      }); 
      e.preventDefault(); // disable selection 
     }).on("mouseup", function() { 
      if(opt.handle === "") { 
       $selected.removeClass(opt.draggableClass); 
      } else { 
       $selected.removeClass(opt.draggableClass) 
        .find(opt.handle).removeClass(opt.activeHandleClass); 
      } 
      $selected = null; 
     }); 

     return this; 

    }; 
})(jQuery); 

답변

0

<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> 
를 사용하여 고정 사용하는 방법을 만들어 적용 draggable.min.js 파일을 사용하여

$(".tukibox").draggable(); 

JQuery와 네이티브 라이브러리는 항상 정의의 사람을 이길!