I have a site under development that's going to use a JS-based drop down menu which will open when the visitor hovers over a single element called "menu" at the top of each page.

Naturally the folks who have JS disabled are not going to be able to use this menu -- and for these folks I've implemented a special CSS-based 'tooltip notice' that appears next to the menu element when they hover over it:

"Please turn JavaScript on and you'll find this menu a pleasure to use!"

This takes care of my non-JS visitors, so now I have to deal with my JS-enabled visitors. I want this tooltip to be disabled for my JS-enabled visitors because it would be an irritation for them to see it every time they mouseover the menu element in order to see the drop down menus.

So basically I'm seeking a way to use JS to disable the CSS-based tooltip whenever JS is enabled. Can anyone suggest a way I might accomplish this? I presume it's going to take an 'onLoad' function of some kind, but I'm not a Javascript programmer so I could use some help from an expert here.

Thanks in advance for any help you can provide ... :)

I have a site under development that's going to use a JS-based drop down menu which will open when the visitor hovers over a single element called "menu" at the top of each page.

Naturally the folks who have JS disabled are not going to be able to use this menu -- and for these folks I've implemented a special CSS-based 'tooltip notice' that appears next to the menu element when they hover over it:

"Please turn JavaScript on and you'll find this menu a pleasure to use!"

This takes care of my non-JS visitors, so now I have to deal with my JS-enabled visitors. I want this tooltip to be disabled for my JS-enabled visitors because it would be an irritation for them to see it every time they mouseover the menu element in order to see the drop down menus.

So basically I'm seeking a way to use JS to disable the CSS-based tooltip whenever JS is enabled. Can anyone suggest a way I might accomplish this? I presume it's going to take an 'onLoad' function of some kind, but I'm not a Javascript programmer so I could use some help from an expert here.

Thanks in advance for any help you can provide ... :)

those with javascript off to block script attacks will not turn javascript on, for a prompt in a random web site, they will leave, and eventually your page will have a large number of negative reports, Search bots dont like javascript.
use a css menu instead of a javascript menu, the structure and code is similar(surprised how easy&similar it is) then every one will be able to access the navigation

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.