You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
458 B

9 months ago
( function ( $, rwmb ) {
'use strict';
/**
* Update text value.
*/
function update() {
var $this = $( this ),
$output = $this.siblings( '.rwmb-range-output' );
$this.on( 'input propertychange change', function () {
$output.html( $this.val() );
} );
}
function init( e ) {
$( e.target ).find( '.rwmb-range' ).each( update );
}
rwmb.$document
.on( 'mb_ready', init )
.on( 'clone', '.rwmb-range', update );
} )( jQuery, rwmb );