Reply To: Results Overlaying Navigation Drop-Down

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Results Overlaying Navigation Drop-Down Reply To: Results Overlaying Navigation Drop-Down

#5274

Ernest Marcinko
Keymaster

The problem is that the results position is absolute to the window scope and the menu box position is absolute to it's parent scope – because it's parent item's position is set to relative.
Z-index defines an absolute element z-axis position relative to other elements with the same positioning, but if the closest relative parent is different, then the element higher up the Node tree is displayed first.

This means, that this is not solvable by ajdusting the z-indexes.

I would rather suggest triggering an event to close the result list, if the user hovers over the menu. Try putting this script to your site footer between script tags:

jQuery(function($) {
    $('.menu-item').hover(function(){ 
        $('body').click();
    });
});

This will trigger a body click if the user hovers over the menu, and it closes the results list.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)