jquery draggable:当你点击可拖动的处理程序时会变得很厉害?

时间:2014-02-09 16:18:51

标签: javascript jquery jquery-ui jquery-ui-draggable jquery-1.9

在将draggable添加到弹出框之前,是否有任何问题与jquery right: 0; bottom: 0;有关?

点击 handler

时, 框会远离光标

jquery的,

$(".popup").draggable({ 
cursor: "move",
handle: ".popup-outer",
cancel: ".popup-inner"
});

HTML,

<div class="popup-outer popup">
    <div class="popup-inner">
        <div class="box-close"><a href="#" class="button-close">x close</a></div>
        <div class="ajax-response"></div>
    </div>
</div>

的CSS,

.popup-outer{
    position:absolute;

    top:0;
    left:0;
    right: 0; //this causes the bug
    bottom: 0; //this causes the bug

    max-width: 1000px;
    height:500px;
    margin: auto;

    padding:6px;
    -moz-border-radius:4px;
    -webkit-border-radius:4px;
    border-radius: 4px; 
    background: url(../image/trans_black.png);
}

.popup-inner {
    text-align:left; 
    background-color:#ffffff; 
    margin:0px; 
    padding:20px;
    overflow:hidden; 
    -moz-border-radius:2px;
    -webkit-border-radius:2px;
    border-radius: 2px;
    border:0px solid #999;
    color:#333333;

    border:0 solid red;

    cursor:default;
}

任何想法我该如何解决?

0 个答案:

没有答案