Skip to content

This is a bundle of jquery plugins for RealPlayer orderpath usage.

License

Notifications You must be signed in to change notification settings

yanhuiyi/jquery-orderpath

Repository files navigation

jQuery Orderpath Plugin

This is a bundle of jquery plugins for RealPlayer orderpath usage.

Getting Started

Download the production version or the development version.

In your web page:

<script src="jquery.js"></script>
<script src="dist/jquery-orderpath.min.js"></script>
<script>
jQuery(function($) {
	$('form').orderpath('validate', {callback: function(input) {
			var errorMessage = input.data('required');
			data = $('<span class="message" />').text(errorMessage);
			input.data('message', data);
			input.parent('p').append(data);
		},
	});
});
</script>

Examples

The custom error display function, you should define when you call the validate function:

$('form').orderpath('validate', { callback: function(input) {
		var errorMessage = input.data('required');
		data = $('<span class="message" />').text(errorMessage);
		input.data('message', data);
		input.parent('p').append(data);
	},
});

In this way, the error message show within parent p element, given you have following HTML structures:

<p>
	<input data-required="required text" />
</p>
<p>
	<textarea data-required="required textarea without value"></textarea>
</p>

$('form').orderpath('validate', { callback: function(input) {
        	input.css('border', '1px solid red');
	}
});

About

This is a bundle of jquery plugins for RealPlayer orderpath usage.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published