jcubic/jquery.splitter

double click event on splitter

ssjogus opened this issue · 1 comments

hi,

thanks for great plugin. Is there any way, by which i can add 'double click' event on the splitter? I need it to minimize the panels

I've addded litle modification and you can now use this code, I don't know why but click don't work:

var counter = 0;
$(document).on('mousedown', function(e) {
  var $target = $(e.target);
  if ($target.is('.vsplitter, .hsplitter')) {
    if (++counter == 2) {
      $target.parents('.splitter_panel').eq(0).data('splitter').position(10);
    }
  } else {
    counter = 0;
  }
});