2

I want to use the Autocomplete Widget from http://api.jqueryui.com/autocomplete/#option-source . They wrote I can use it with contenteditable, but it doesnt work. I also use it in wordpress. So maybe this would be the error. I get this error:

"NetworkError: 404 Not Found - http://localhost/wordpress/wp-content/plugins/.../css/images/ui-bg_flat_75_ffffff_40x100.png"

But I also included this:

wp_enqueue_script("quizEditorScript", plugins_url('js/quizEditor.js', QDB_PATH."qdbConnect"), array('jquery-ui-autocomplete', 'jquery-ui-dialog'));

My table looks like this:

<table id = "quiz_table">
...
"<td class = 'cate'  contenteditable = 'true' tabindex = '"+tabId+"'>"+cate+"</td>" +
"<td class = 'diff'  contenteditable = 'true' tabindex = '"+tabId+"'>"+diff+"</td>" +
...

I want to use autocomplete on the "cate".

var availableTags = ["AAA"];
        //jQuery.fn.val = jQuery.fn.html; //Im not sure how to use this
        jQuery(".cate").autocomplete({
            source: availableTags
        }); 

Do I have to add some more details or do I have to do it in an other way ?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user2889693
  • 155
  • 1
  • 2
  • 10

0 Answers0