All pastes #2053661 Raw Edit

Miscellany

public text v1 · immutable
#2053661 ·published 2011-05-04 00:11 UTC
rendered paste body
This works with just the first function (using var availableTags) perfectly - but as soon as I add the second function (containing cusAvailableTags) then both cease to function. I'm sure its because I just don't know how to name the second function properly, and thus it is causing a conflict.

Can you just gimme a quick hand to know how to implement the second function.


<script>
	$(function() {
		var availableTags = [<?php echo $autocomplete; ?>];
		$( "<?php echo $fieldname; ?>" ).autocomplete({
			source: availableTags
		});
	});
	
	$(function() {
		var cusAvailableTags = [<?php echo $cusautocomplete; ?>];
		$( "<?php echo $cusfieldname; ?>" ).autocomplete({
			source: cusAvailableTags
		});
	});

</script>