Use .siblings to locate the suggestions, clear elements for efficiency (#285)
This commit is contained in:
committed by
Niklas Laxström
parent
bccf103900
commit
37c9d66a2b
@@ -46,8 +46,8 @@
|
||||
this.options = $.extend( {}, $.fn.languagefilter.defaults, options );
|
||||
this.$element.addClass( 'languagefilter' );
|
||||
this.resultCount = 0;
|
||||
this.$suggestion = this.$element.parents().find( '.' + this.$element.data( 'suggestion' ) );
|
||||
this.$clear = this.$element.parents().find( '.' + this.$element.data( 'clear' ) );
|
||||
this.$suggestion = this.$element.siblings( '.' + this.$element.data( 'suggestion' ) );
|
||||
this.$clear = this.$element.siblings( '.' + this.$element.data( 'clear' ) );
|
||||
this.selectedLanguage = null;
|
||||
this.init();
|
||||
this.listen();
|
||||
|
||||
Reference in New Issue
Block a user