Appendo » Usage Examples

Appendo usage examples are here.

All of the demos on this page require jQuery and jquery.appendo.js
To load these in your page, the code (in <head>) should be something like this:

<script src="js/jquery.pack.js"></script> 
<script src="js/jquery.appendo.js"></script> 

Appendo is self-contained and does not need any external CSS files.

Default Behavior

Default Appendo behavior.

UserID Account Access Type
Appendo attaches automatically to any tables with class "appendo":
<table class="appendo"> ... </table>

Limit Maximum Rows

A common usage scenario involves limiting the number of rows.

External Username Contact Email Access Type
Here we're invoking with a basic option to limit the rows:
jQuery(function() { 
	jQuery('#demo2').appendo({ maxRows: 5 });
Will attach to this table in the markup:
<table id="demo2"> ... </table>

Callback Handlers

Demonstrates an event handler that confirms removal of "filled" rows.

Username Access Access Type
Write a handler function for onDel.
Remember, return true to delete.
function confirm_filled($row)
	var filled = 0;
	$row.find('input,select').each(function() {
		if (jQuery(this).val()) filled++;
	if (filled) return confirm('Do you really want to remove this row?');
	return true;
Then attach this handler to the table:
jQuery(function() { 
	jQuery('#demo4').appendo({ onDel: confirm_filled });