Skip to content Skip to sidebar Skip to footer

Jquery Resizable Event Does Not End

i am making some interactive UI and using jquery for resize and mouse events. I bind mouseOver and click event for all elements and when i get a click, i remove the click listener

Solution 1:

The contextMenu(which is listening to mouseclick event) is interefering with the resize end Event(which also wants the mouseclick event). Solution :

  $('.selected').resizable({
    start:function () {
      $("*").destroyContextMenu();
      console.log('resize started');
    },
    stop:function () {

      $("*").contextMenu({
          menu:'myMenu'
        },
        function (action, el, pos) {
          console.log(el);
          eval(action + '(el)');
        });
      console.log('resize stopped');
    },
    resize:function () {
      console.log("resize happened");
    }
  });

What i did was, destroy the context menu as soon as the resize started, so its not listening to the mouseclick event anymore. and make it back when the resize event ends.

Post a Comment for "Jquery Resizable Event Does Not End"