using return false in plugin code
hey guys the below peice of JS is just from a regular plugin , have a look :
- this.$navNext.on( 'click.gallery', function( event ) {
-
- if( _self.options.autoplay ) {
-
- clearTimeout( _self.slideshow );
- _self.options.autoplay = false;
-
- }
-
- _self._navigate('next');
- return false; // return false here
-
- });
now notice 2 things here ,
1st the element on which the the on handler is applied , I.E.
- this.$navNext;
and the 2nd is the
now in this instance the this.$navNext; is a <a> element , but is the return false needed if the we know that before hand the this.$navNext is not a <a> element ?