range.js (458B)
1 ( function ( $, rwmb ) { 2 'use strict'; 3 4 /** 5 * Update text value. 6 */ 7 function update() { 8 var $this = $( this ), 9 $output = $this.siblings( '.rwmb-range-output' ); 10 11 $this.on( 'input propertychange change', function () { 12 $output.html( $this.val() ); 13 } ); 14 } 15 16 function init( e ) { 17 $( e.target ).find( '.rwmb-range' ).each( update ); 18 } 19 20 rwmb.$document 21 .on( 'mb_ready', init ) 22 .on( 'clone', '.rwmb-range', update ); 23 } )( jQuery, rwmb );