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:
@@ -246,7 +246,9 @@
|
||||
a.className = 'autonym';
|
||||
|
||||
li.appendChild( a );
|
||||
|
||||
if( this.options.languageDecorator ) {
|
||||
this.options.languageDecorator( $( a ), code );
|
||||
}
|
||||
return li;
|
||||
},
|
||||
|
||||
@@ -386,7 +388,8 @@
|
||||
$.fn.lcd.defaults = {
|
||||
languages: null,
|
||||
showRegions: ['WW', 'AM', 'EU', 'ME', 'AF', 'AS', 'PA'],
|
||||
itemsPerColumn: 8
|
||||
itemsPerColumn: 8,
|
||||
languageDecorator: null
|
||||
};
|
||||
|
||||
$.fn.lcd.Constructor = LanguageCategoryDisplay;
|
||||
|
||||
Reference in New Issue
Block a user