Apply autonym class only to autonyms
Change-Id: I6383b9f4ac1f38f47b06a83bf3b009d2ce584215
This commit is contained in:
@@ -59,22 +59,22 @@ td.index {
|
|||||||
<option value="36">36</option>
|
<option value="36">36</option>
|
||||||
<option value="48">48</option>
|
<option value="48">48</option>
|
||||||
</select>
|
</select>
|
||||||
<table class="autonym"><tr></tr></table>
|
<table><tr></tr></table>
|
||||||
<div>A dropdown example:
|
<div>A dropdown example:
|
||||||
<select class="dropdown autonym">
|
<select class="dropdown autonym">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var index = 1,
|
var index = 1,
|
||||||
$autonym = $( '.autonym' ),
|
|
||||||
$fontSelector = $( '#font-selector' ),
|
$fontSelector = $( '#font-selector' ),
|
||||||
$sizeSelector = $( '#size-selector' );
|
$sizeSelector = $( '#size-selector' );
|
||||||
|
|
||||||
$fontSelector.change( function () {
|
$fontSelector.change( function () {
|
||||||
$autonym.css( 'font-family', $( this ).val() );
|
$( '.autonym' ).css( 'font-family', $( this ).val() );
|
||||||
});
|
});
|
||||||
|
|
||||||
$sizeSelector.change( function () {
|
$sizeSelector.change( function () {
|
||||||
$autonym.css( 'font-size', $( this ).val() + 'px' );
|
$( '.autonym' ).css( 'font-size', $( this ).val() + 'px' );
|
||||||
});
|
});
|
||||||
|
|
||||||
$.each( $.uls.data.languages, function( langCode ) {
|
$.each( $.uls.data.languages, function( langCode ) {
|
||||||
@@ -99,7 +99,7 @@ $.each( $.uls.data.languages, function( langCode ) {
|
|||||||
.addClass( 'lang' )
|
.addClass( 'lang' )
|
||||||
.text( langCode ),
|
.text( langCode ),
|
||||||
$( '<td>' )
|
$( '<td>' )
|
||||||
.addClass( 'name' )
|
.addClass( 'name autonym' )
|
||||||
.attr( {
|
.attr( {
|
||||||
lang: langCode,
|
lang: langCode,
|
||||||
dir: dir
|
dir: dir
|
||||||
@@ -110,7 +110,7 @@ $.each( $.uls.data.languages, function( langCode ) {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
// Apply the initial font
|
// Apply the initial font
|
||||||
$autonym.css( 'font-family', $fontSelector.val() );
|
$( '.autonym' ).css( 'font-family', $fontSelector.val() );
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user