messages_autocomplete_init_jsblock()

Print inline JS for initializing the messages autocomplete.


Source Source

File: bp-messages/bp-messages-cssjs.php

function messages_autocomplete_init_jsblock() {
?>

	<script type="text/javascript">
		jQuery(document).ready(function() {
			var acfb = jQuery("ul.first").autoCompletefb({urlLookup: ajaxurl});

			jQuery('#send_message_form').submit( function() {
				var users = document.getElementById('send-to-usernames').className;
				document.getElementById('send-to-usernames').value = String(users);
			});
		});
	</script>

<?php
}

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.