2

I found in this sample code the jQuery event redraw:

$(window).on("redraw",function(){ [SOME CODE] });

I did not found any documentation about it in the jQuery site, nor in any JS tutorial or reference.

What is it?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Giacomo Paita
  • 1,411
  • 2
  • 12
  • 21

1 Answers1

1

It must be some custom event that the plugin is triggering some where in the code.

Here is an example of custom events that can be created in jQuery

DEMO: http://jsfiddle.net/Lk79jovg/

$('.test').on('keyup', function(){
    var $this = $(this);
    if($this.val() == 'some text'){
        $(window).trigger('custom');
    }
});

$(window).on('custom', function(){
    alert('some text was typed in the input');
});
Sam Battat
  • 5,725
  • 1
  • 20
  • 29