jQuery.uls bug fixes and keep template with the plugin

* The jQuery selectors should be referring to the menu for the current
  ULS instance rather than querying on the page. This allows multiple
  instances of ULS present in the page
* Keep the HTML template with the plugin. No more HTML added from hooks.
* Updated the example based on above change.
* Updated the hooks code.
* Some more documentation.

Change-Id: I48e2e167bc2c09b8653a142c50317c22e8ba1362
This commit is contained in:
Santhosh Thottingal
2012-08-17 16:26:08 +05:30
committed by Amir E. Aharoni
parent bc98b8ff1d
commit 9da90921c4
4 changed files with 101 additions and 86 deletions

View File

@@ -31,8 +31,8 @@
this.options = $.extend( {}, $.fn.regionselector.defaults, options );
this.$element.addClass( 'languagefilter' );
this.resultCount = 0;
this.$suggestion = $( '#' + this.$element.data( 'suggestion' ) );
this.$clear = $( '#'+ this.$element.data( 'clear' ) );
this.$suggestion = this.$element.parents().find( '#' + this.$element.data( 'suggestion' ) );
this.$clear = this.$element.parents().find( '#'+ this.$element.data( 'clear' ) );
this.selectedLanguage = null;
this.listen();
};