2

TOday i did a lot of googling to find the solution to my jquery autocomplete issue. Finaly i am here to find help... The issue is...

On my wordpress admin side (on post edit screen) I am using jquery autocomplete (jquery-ui) library. which gives me following error...

"widget.extend is not a function"

this error is located in code at

_createWidget: function( options, element ) {
element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
this.uuid = uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.options = $.widget.extend( {},
    this.options,
    this._getCreateOptions(),
    options );

this.bindings = $();
this.hoverable = $();
this.focusable = $();

I am sure about following....

1.It's not version issue, i tried various google hosted and self hosting jquery-ui.js version. but the issue is same. 2.the same code works on all other admin side pages (i added in footer so can test in all admin side pages), but only gives error on post/page edit page where tinymce is loaded...

on these page, where it gives error i found following code in page source which i think is tinymce related....

<script type='text/javascript' src='http://wp.mindstien.com/wp-admin/load-scripts.php?c=1&amp;load=admin-bar,hoverIntent,common,jquery-color,schedule,wp-ajax-response,autosave,wp-lists,quicktags,jquery-query,admin-comments,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,postbox,post,thickbox,media-upload,word-count,editor,jquery-ui-resizable,jquery-ui-draggable,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,wpdialogs,wplink,wpdialogs-popup,wp-fullscreen&amp;ver=3.4.2'></script>

this code is located in footer of the page.

Can anyone guide me how can i solve this issue ? Or Can anyone knows the proper way to use autocomplete on wordpress admin page where tinymce scripts are also loaded ?

Thanks.

4

0 回答 0