1

.trigger("mousedown"); を呼び出すだけです。動作しません。

scrollPane_Y.draggable({
    axis: "y",
    stop: function (event, ui) { 
        /*
        i get triggered when the containment is hit
        so if a user hits the containment and then
        goes in the other direction nothing happens.
        */
         scrollPane_Y.trigger("mousedown"); // doesnt work
         scrollPane_Y.mousedown(function (e) { // from third link. doesnt work
             scrollPane_Y.trigger(e);
         });
    },
    containment: [0, min_scrollPane_Y, 0, max_scrollPane_Y]
});
4

1 に答える 1

0

正しいパラメーターを使用して、そのプライベート メソッドを直接呼び出すことができます。

scrollPane_Y.draggable({
    axis: "y",
    stop: function (event, ui) { 
        /*
        i get triggered when the containment is hit
        so if a user hits the containment and then
        goes in the other direction nothing happens.
        */

         // retrieve the instance and call its private method
         scrollPane_Y.data("ui-draggable")._mouseDown(event);
    },
    containment: [0, min_scrollPane_Y, 0, max_scrollPane_Y]
});
于 2013-02-25T03:33:12.820 に答える