Title: Console: .andSelf() is not a function
Last modified: September 1, 2016

---

# Console: .andSelf() is not a function

 *  [briantschu](https://wordpress.org/support/users/briantschu/)
 * (@briantschu)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/console-andself-is-not-a-function/)
 * When hovering over a menu item on our homepage (nwhospital.org) the menu would
   not drop down and an error in the console was recorded: `TypeError: anchor.parent(...).
   siblings(...).find(...).andSelf is not a function` [from line 93 of maxmegamenu.
   js].
 * After investigating, I changed the deprecated .andSelf to .addBack in maxmegamenu.
   js. Now the dropdown is working on hover.
 * Curiously, the menu was working on every page but the home page with the .andSelf
   reference. After changing the reference all pages continue to function.
 * Now, I notice when moving the mouse away from the menu item, the closing of the
   dropdown is not instant. First you see the background color of the menu item 
   go back to normal, and then the dropdown menu closes. I haven’t ever paid close
   enough attention to know if it has always functioned this way.
 * Here’s a dump from the console when loading the homepage with the .andSelf reference
   included. It may be worth noting we’re using the standard WP jQuery implementation:
   jQuery v1.12.3 and JQMIGRATE v1.4.0
 *     ```
       TypeError: anchor.parent(...).siblings(...).find(...).andSelf is not a function
       $.maxmegamenu/plugin.hideSiblingPanels()
        maxmegamenu.js:93
       $.maxmegamenu/plugin.showPanel()
        maxmegamenu.js:129
       $.maxmegamenu/openOnHover/<.over()
        maxmegamenu.js:229
       a.fn.hoverIntent/k()
        hoverIntent.min.js:1
       a.fn.hoverIntent/k/c.hoverIntent_t<()
        hoverIntent.min.js:1
       ```
   
 * [https://wordpress.org/plugins/megamenu/](https://wordpress.org/plugins/megamenu/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [megamenu](https://wordpress.org/support/users/megamenu/)
 * (@megamenu)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/console-andself-is-not-a-function/#post-7576778)
 * Hi Brian,
 * I’m also seeing jQuery v3.0 included on your site:
 * [http://screencast.com/t/l26BVLqo](http://screencast.com/t/l26BVLqo)
 * Please could you try removing that? Running 2 copies of jQuery on the same page
   usually leads to problems.
 * Regards,
    Tom

Viewing 1 replies (of 1 total)

The topic ‘Console: .andSelf() is not a function’ is closed to new replies.

 * ![](https://ps.w.org/megamenu/assets/icon-128x128.png?rev=1489843)
 * [Max Mega Menu](https://wordpress.org/plugins/megamenu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/megamenu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/megamenu/)
 * [Active Topics](https://wordpress.org/support/plugin/megamenu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/megamenu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/megamenu/reviews/)

## Tags

 * [hover](https://wordpress.org/support/topic-tag/hover/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 1 reply
 * 2 participants
 * Last reply from: [megamenu](https://wordpress.org/support/users/megamenu/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/console-andself-is-not-a-function/#post-7576778)
 * Status: not resolved