I’ve tried following several examples I found, but haven’t been able to get this to work.
The zillow menu in the map view with listings on the sidebar bar auto-expands on hover, which is annoying when I move my mouse too far accidentally past the search bar, and then have to move it away to make the expanded menu disappear.
I’m trying the following in my tampermonkey script, but it won’t work:
// ==UserScript==
// @name Hide expanding menu bar
// @namespace http://tampermonkey.net/
// @version 0.1
// @require https://code.jquery.com/jquery-3.6.0.min.js
// @description Hides zillow auto-expanding menu
// @author mikmak
// @match https://www.zillow.com/*
// @grant GM_addStyle
// ==/UserScript==
const $ = window.$;
function hideStuff() {
$('.data-zg-section="main"').removeClass('.data-zg-section="main"');
$('.data-zg-section="main"').hide();
}
The menu bar I am referring to is the “Buy Rent Sell Get a mortgage Find an agent” menu above the search box at the top left side.


