Jquery Autocomplete Source
-
Hi,
I have some trouble to use autocomplete with jquery.
I think that the function works because I can find this in my code :
<ul class="ui-autocomplete ui-front ui-menu ui-widget ui-widget-content" id="ui-id-1" tabindex="0" style="display: none;"></ul>But the results do not display because I have this error :
Fatal error: Call to a member function prepare() on null in /home/clients/717b0e9cd144e922df74206711a41135/web/cimaya/wp-content/themes/cimaya/autocomplete.php on line 19/autocomplete.php
function get_liste_resultat_reference( $q = '' ) { global $wpdb; $sql = $wpdb->prepare(...); <- line 19 }/inc/main.js
$('#rech-nav').autocomplete({ source: $.get('/cimaya/wp-content/themes/cimaya/autocomplete.php'), appendTo: "#rech-nav", autoFocus: true, minLength: 2, });I think that the problem is wpdb.
Can someone help me ? I am becoming crazy !
Thanks !!
PS : Sorry for my english
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
The topic ‘Jquery Autocomplete Source’ is closed to new replies.