jquery.jtag.js
// Start trying to add a set of tags, but only do it if there is a success
Start trying to add a set of tags, but only do it if there is a success
Start trying to add a set of tags but only do it if there is a success
function tryAddTags($this, elem, labelStr){
		var labelStr = $.trim(labelStr.toLowerCase());
		if (labelStr != "") {
			var labelsArray = labelStr.split(",");
			var cleanArray = []
			for (item in labelsArray) {
				if (labelsArray[item]+""!="") cleanArray.push(labelsArray[item]);
			}
			labelsArray = cleanArray;
		}
		opts.onAddTags(labelsArray, function(data){
			if (data.result == "success") {
				doAddTags($this, elem, data.tags);
			} else {
				opts.onAddTagsFailed(data, label);
			}
		})
	}
function tryAddTags ( $this , elem , labelStr ) { var labelStr = $ . trim ( labelStr . toLowerCase ( ) ) ; if ( labelStr != "" ) { var labelsArray = labelStr . split ( "," ) ; var cleanArray = [ ] for ( item in labelsArray ) { if ( labelsArray [ item ] + "" != "" ) cleanArray . push ( labelsArray [ item ] ) ; } labelsArray = cleanArray ; } opts . onAddTags ( labelsArray , function ( data ) { if ( data . result == "success" ) { doAddTags ( $this , elem , data . tags ) ; } else { opts . onAddTagsFailed ( data , label ) ; } } ) }
Start trying to add a set of tags, but only do it if there is a success
Start trying to add a set of tags but only do it if there is a success
// Remove empty strings