# polylang/2.0.12/js/user.js

Polylang, version 2.0.12. 21 lines.

- Page: https://pluginprobe.com/plugins/polylang/2.0.12/code/js/user.js
- Raw: https://pluginprobe.com/plugins/polylang/2.0.12/raw/js/user.js
- Modified: 2015-12-16T13:33:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/polylang/2.0.12/code/js/user.js#L10-L20`.

```javascript
jQuery( document ).ready(function( $ ) {
	// biography
	// FIXME there is probably a more efficient way to do this
	var td = $( '#description' ).parent();
	var d = $( '#description' ).clone();
	var span = td.children( '.description' ).clone();
	td.children().remove();

	$( '.biography' ).each(function(){
		lang = $( this ).attr( 'name' ).split( '___' );
		desc = d.clone();
		desc.attr( 'name', 'description_' + lang[0] );
		desc.html( $( this ).val() );
		td.append( '<div>' + lang[1] + '</div' );
		td.append( desc );
	});

	td.append( '<br />' );
	td.append( span );
});

```
