Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

2.03. How to: Redefine jQuery UI scripts

franz-josef-kaiser edited this page Dec 20, 2011 · 1 revision

In short: You have to loop over all scripts ... again.

The following shows an example for the (upcoming) slider. You have to add that after the scripts that have been added by the meta box class.

jQuery( document ).ready( function($) 
{
	var 
		id = null,
		el = null
	;
	$( '.rwmb-slider' ).each( function( i, val ) 
	{
		id = $( val ).attr( 'id' );
		el = $( '#' + id );

		el.slider(
		{
			// Define your options here
			// Valid options see @link http://jqueryui.com/demos/slider/
			optionA:	valueA,
			optionB:	valueB
		} );
	});
} );
Clone this wiki locally