Apply autonym class only to autonyms

Change-Id: I6383b9f4ac1f38f47b06a83bf3b009d2ce584215
This commit is contained in:
Amir E. Aharoni
2013-12-03 18:36:34 +02:00
parent 1a086cce15
commit 25a72faae3

View File

@@ -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>