Properties

Property Type Description
aclass string A string containing class name of delete link. Defaults to 'delbutton'
divider string A string used to separate words. Defaults to '-'
prefix string A string used as prefix of element ID. Defaults to ''
sclass string A string containing class name of tag' holder element. Defaults to 'tagz'

What do you need?

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.tagcloud.js"></script>
<link type="text/css" rel="stylesheet" href="css/jquery.tagcloud.css" />

Example 1

<script type="text/javascript">
$(function () {
	$('#btnTagAdd1').click(function(){
		$('#newtag1').addtag({
			holder_id : 'tagchecklist1',
			prefix: 't1'
		});
		$('#newtag1').val('');
	});
	$('#newtag1').keydown(function(event){
		if ($.isenter({
			event: event
		})) {
			$('#newtag1').addtag({
				holder_id: 'tagchecklist1',
				prefix: 't1'
			});
			$('#newtag1').val('');
			return false;
		}
	});
	$('#newtag1').keypress(function(event){
		if ($.isenter({
			event: event
		})) {
			$('#newtag1').addtag({
				holder_id: 'tagchecklist1',
				prefix: 't1'
			});
			$('#newtag1').val('');
			return false;
		}
	});
});
</script>

Current tags:

Example 2

<script type="text/javascript">
$(function(){
	$('#btnTagAdd2').click(function(){
		$('#newtag2').addtag({
			holder_id : 'tagchecklist2',
			prefix: 't2'
		});
		$('#newtag2').val('');
	});
	$('#newtag2').keydown(function(event){
		if ($.isenter({
			event: event
		})) {
			$('#newtag2').addtag({
				holder_id: 'tagchecklist2',
				prefix: 't2'
			});
			$('#newtag2').val('');
			return false;
		}
	});
	$('#newtag2').keypress(function(event){
		if ($.isenter({
			event: event
		})) {
			$('#newtag2').addtag({
				holder_id: 'tagchecklist2',
				prefix: 't2'
			});
			$('#newtag2').val('');
			return false;
		}
	});
	$('a.delbutton').click(function(e) {
		e.preventDefault();
		$(this).parent().remove();
	});
});
</script>

Current tags:
X jQuery Plugin X Velocity Conference