Grow your CSS skills. Land your dream job.

[Solved] Validating WordPress dropdown

  • # September 10, 2009 at 11:20 am

    Ooh, just noticed what you meant by certain links disabled.

    That’s already what the script does, it only disables the links that have drop down items. and the 4 you mentioned are all of the drop-downs.

    I thought you meant that you waned one drop down that ALSO was click-able (say charity for example.)

    Outside of all of the code issues, I wanted to wish you luck on your journey. It seems like a very ambitious plan, and sounds like it could be a lot of fun! I always wanted to go to Alaska, but I’m stuck here in Florida….

    # September 10, 2009 at 11:22 am
    "leehughes" wrote:
    Wow.. i don’t know if that’s for the custom one for Multimedia, etc from what i can see it works for all choosen buttons except multimedia..

    have a look :)

    http://www.leehughes.co.uk :)

    Thanks spud :)

    I didn’t change it excpet to put it into no conflict mode, I built it that way to begin with as I thoughts that is what you meant, which apparently it is.

    I tested it and it didn’t work for multimedia, then refreshed and it workd fine, maybe just a cache issue…

    # September 10, 2009 at 11:26 am

    Thanks :)

    What part of the code tells which parent page to disable? Just incase I wanna add more parent pages in future ;) I don’t see any reference to certain pages.. quite confused how it’s only picking the pages I requested.. code is an amazing thing :)

    Cheers :)

    p.s You’re never stuck in Florida ;)

    # September 10, 2009 at 11:27 am

    Ohh i get it now..

    It has disabled the links with drop down menus..

    Ahhhhhhhhh clever ;)

    # September 10, 2009 at 11:34 am

    I took an extra step and validated your code,

    You need to fix a few things.

    Code:

    add the bolded part, you forgot to close the link.

    Code:
    [b][/b]

    Again forgot to close the small tag… (why is there even a small tag here?

    also this is the last,

    Code:

    role is not an attribute for a form tag, what exactly was it for? I’m confused.

    # September 10, 2009 at 11:37 am

    on another note, will this script work if i move the drop drop under the header image?

    due to conflicts with IE I have to move the drop down menu.. Just thought you might have written it for the position the drop down was in (i know nothing about jQUERY you see)

    :)

    # September 10, 2009 at 11:38 am
    "blue642" wrote:
    I took an extra step and validated your code,

    You need to fix a few things.

    Code:

    add the bolded part, you forgot to close the link.

    Code:
    [b][/b]

    Again forgot to close the small tag… (why is there even a small tag here?

    also this is the last,

    Code:

    role is not an attribute for a form tag, what exactly was it for? I’m confused.

    Too kind :)

    Thanks for the tips, validation does my head in.. Av only just started web design (as you might have guessed) and validation was just an extra kick in the nuts for me after IE headaches :D

    # September 10, 2009 at 11:47 am
    "leehughes" wrote:
    Thanks :)

    What part of the code tells which parent page to disable? Just incase I wanna add more parent pages in future ;) I don’t see any reference to certain pages.. quite confused how it’s only picking the pages I requested.. code is an amazing thing :)

    Cheers :)

    p.s You’re never stuck in Florida ;)

    Here’s a quick breakdown of how it works.

    Your navigation is built as an unordered list (ul element) with list items (li element) that are your actual links….

    Inside of certain list items you have another list of links, such as,

    Code:
  • Miscellaneous

The code searches for a user to mouseover a list item that has another list stacked inside of it, and if they click the link, it directs them nowhere.

speaking of this, you should change the first line to this:

Code:
$j(“#nav li:has(ul)”).hover(function () {

that way it only searches this navigation system for this, If not, if you ever created a second navigation, it would disable those parent links also, (unless you want that)

# September 10, 2009 at 11:51 am

Ahh makes alot of sense now :)

Thanks :)

# September 10, 2009 at 11:53 am
"leehughes" wrote:
Too kind :)

Thanks for the tips, validation does my head in.. Av only just started web design (as you might have guessed) and validation was just an extra kick in the nuts for me after IE headaches :D

Lol, no problem at all, and I know how you feel, I’m still new myself.

As for moving the dropdown, it should work anywhere you move it.

as for the validation, they were easy mistakes to make, and easy mistakes to correct, so no big worries. sometimes its just hard to understand what the heck they mean on the page (so much tech mumbo jumbo.) We need an easier validator, that says "Hey stupid, close this tag!" or more politely as is the new trend… "Oops! Excuse me, you forgot to close this tag, you should do that A.S.A.P…."

@Chris Coyier, you listening? I think this should be your next web service project ;D

# September 10, 2009 at 12:10 pm

Agreed :P

# September 18, 2009 at 11:07 am
"blue642" wrote:
jQuery is conflicting, I’ll be right back, with a fix….

Code:

try that instead.

am not sure why but this isn’t working anymore..

it’s still in my code but not working..

Viewing 12 posts - 16 through 27 (of 27 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".