Jquery UI sortable - perform action BEFORE start event fires

后端 未结 2 2121
南旧
南旧 2021-02-07 15:52

I have searched STACKOVERFLOW and other forums for the solution to my problem - if I have missed a working solution please point me towards it.

My Problem: Whenever drag

2条回答
  •  感情败类
    2021-02-07 16:15

    I've searched a long time for this "solution":

    $('.handle').each(function() {
        $(this).mousedown(function() {
            $(this).parent().parent().children('ol').hide('blind', 500);
        });
    });
    

    You can trigger a event by mousedowning the handle and hide whatever you want. Then set the option delay of the sortable to a value greater than the duration of the hiding animation, in my example 501.

    It's not a elegant solution, but it works - at least in my program.

提交回复
热议问题