| 1 |
jQuery( document ).ready(function( $ ) { |
| 2 |
// biography |
| 3 |
// FIXME there is probably a more efficient way to do this |
| 4 |
var td = $( '#description' ).parent(); |
| 5 |
var d = $( '#description' ).clone(); |
| 6 |
var span = td.children( '.description' ).clone(); |
| 7 |
td.children().remove(); |
| 8 |
|
| 9 |
$( '.biography' ).each(function(){ |
| 10 |
lang = $( this ).attr( 'name' ).split( '___' ); |
| 11 |
desc = d.clone(); |
| 12 |
desc.attr( 'name', 'description_' + lang[0] ); |
| 13 |
desc.html( $( this ).val() ); |
| 14 |
td.append( '<div>' + lang[1] + '</div' ); |
| 15 |
td.append( desc ); |
| 16 |
}); |
| 17 |
|
| 18 |
td.append( '<br />' ); |
| 19 |
td.append( span ); |
| 20 |
}); |
| 21 |
|