Add decorator option for language links

Callback function to be called when a language link is prepared
Can be used for custom decoration.
Arguments:
(a) the $language - the language link jQuery object
(b) languageCode

The function can do any styling, changing properites etc on the passed link.
See examples/decorator.html for example usage.

Change-Id: I5a67654440a07cf7dfac683e22dcb5000ded0bfe
This commit is contained in:
Santhosh Thottingal
2014-09-22 12:32:05 +05:30
parent f2e00432ce
commit 7346469e20
4 changed files with 51 additions and 4 deletions

View File

@@ -93,6 +93,7 @@ $( '.uls-trigger' ).uls( {
| onCancel | function to be handled when language selection is not done. ie. language selector is closed without selecting any |
| showRegions | Regions to be shown in the language selector. Default: ['WW', 'AM', 'EU', 'ME', 'AF', 'AS', 'PA'] |
| itemsPerColumn | Number of languages per column. Default is 8 |
| languageDecorator | Callback function to be called when a language link is prepared - for custom decoration. Arguments: (a) the $language - the language link jQuery object (b) languageCode. The function can do any styling, changing properites etc on the passed link. See examples/decorator.html for example usage.|
Features