I have created a node add form using the field group module to put the form in a jQuery accordion.
I have a auto-complete field that is at the bottom of one pane so the div that appears that lets users choose from the auto-complete options is behind the pane below it as it has overflow: hidden. Here is an image of the problem:
I've fixed this behavior by changing 2 lines in autocomplete.js in the populatePopup function:
//var position = $input.position(); // changes to: var position = $input.offset(); // and //$input.before(this.popup); // changes to: $('body').append(this.popup);
As the auto-complete div is now appended to the body it appears above everything else.
This is great but the problem is I don't want to start hacking Drupal core js files.
I could copy the whole autocomplete.js to a new file and then replace the whole thing, but really I just want to override the populatePopup function.
Is it possible to do this?
(I've tried copying the populatePopup function into my own js file but I get the error Drupal.jsAC is undefined.)