Disable pages on drop down


On my drop down for www.leehughes.co.uk I have no information for Multimedia, Expeditions, Charity, Miscellaneous and more…

People are clicking these and just end up at a blank page… Is there a way to make these unclickable?

When I was using dreamweaver I simply used a #. Now am on wordpress it’s a but more trickey…

I was told that javascript could solve this… Can it?


for anyone that cares

script type=“text/javascript”>
var $j = jQuery.noConflict();

$j(document).ready(function () {

           $j("li:has(ul)").hover(function () {
                  $j(this).children("a").click(function () {
                         return false;



From your code I don’t see a point to have hover event listener there at all. The way you have it you add click listener each time you hover over dropdown menu.
This should give you same effect but without that problem:

$j(function() {
   $j("li:has(ul) > a").click(function() {
      return false;

Had a bit of a clean out… disabled some plugins etc but don’t think av touched actual code…

All website working fine…

on nav bar www.leehughes.co.uk

Well the code I posted doesn’t work anymore for some reason… tried your code… still not working…

Confused as to why it would just stop working:shifty:

maybe you’ve got some js error before this code, so it’s not executed? or all other js code working fine?
can you post link to page so it will be easier to debug?

it looks like don’t have jQuery loaded, $j is undefined, so is jQuery variable. Maybe you accidentally removed that during clean up.

have added

<script type=‘text/javascript’ src=‘http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2’></script>

Still not working… argghh

Thanks for your help though :slight_smile:

working now :slight_smile:

working for me right now, maybe you have page cached or something. I tested in FF3.5.7

great! :slight_smile:

Yeah, I remember now… I was getting a F on Yslow and had 17 javascripts requests… I couldn’t figure out how to move them and the css to a external sheet so I just has a clean out :slight_smile:

Try combining css and js in few large files if possible, this will help.

I didn’t understand how to do it and the large percentage of request where from plugins anyway so I just deleted them…

I think am on 6 at the mo :slight_smile:

well, 6 is reasonable. But it easy to combine files if you have them locally, you just copy/paste everything in one file, in the order you have them loaded right now and load that one file.
It will be harder to maintain the code though. But you can combine at least some code which you does not change often.

Thanks for the advice…

I am planning to change my site however, using the thesis theme so I get clean code :slight_smile:

I shall take note for the future though :slight_smile: