[wp-hackers] Is there a framework for auto-suggest for plugins?

Austin Matzko if.website at gmail.com
Thu Oct 23 13:11:21 GMT 2008


On Thu, Oct 23, 2008 at 8:41 AM, Michael Harris <harrismw at huridocs.org> wrote:
> Except, well, I've
> looked through it and I can't work out how WordPress is doing it.

Take a look in wp-admin/js/post.js :

jQuery('#newtag').suggest( 'admin-ajax.php?action=ajax-tag-search', {
delay: 500, minchars: 2, multiple: true, multipleSep: "," } );

This tells jQuery to attach an event listener to the input field with
id "newtag," so that after 2 keystrokes it posts a request to
admin-ajax.php?action=ajax-tag-search with the typed input value.  It
expects the response suggestions to be separated by line-breaks.


More information about the wp-hackers mailing list