This is a bundle of jquery plugins for RealPlayer orderpath usage.
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>
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');
}
});