SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2011
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery Selectors in Wordpress Navigation

    Hey everyone. I am trying to find a workaround to this navigation bar problem I am having with Wordpress and jQuery. Here is the site:

    http://hippo.arvixe.com/~bgmh1986/site/

    So far the jQuery calls are working as planned, dimming each nav button on rollover. However, I want to NOT select the child ul's of the nav menu. For instance, rolling over Contact displays a Child Page (still formatting of course), but it too dims once displayed. The "navwrapper" I surrounded my tags in also encapsulates this ul because it is next to the li of the parent list. After looking around, I've tried this bit of code:

    Code:
    var thumbs = $('#menu-navigation > li');
    As Wordpress generates this id for the main ul in navigation. The only thing making this a bit difficult for me is that WP generates nav's dynamically and I still need to keep this functionality. I'm sure this is just a small fix somewhere. If anyone could help that would be great. Thanks in advance!

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by kossae9000 View Post
    As Wordpress generates this id for the main ul in navigation. The only thing making this a bit difficult for me is that WP generates nav's dynamically and I still need to keep this functionality. I'm sure this is just a small fix somewhere. If anyone could help that would be great. Thanks in advance!
    Is it possible for us to take a look at a page that exhibits the problem?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2011
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was actually able to achieve my result with the .not() selector in jQuery apparently. Thanks!

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2011
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, in IE this method doesn't seem to be working properly for some reason. Does anyone know how to fix this?

    http://hippo.arvixe.com/~bgmh1986/site/

    Hover over the navigation and observe the behavior. Thanks for your help!

  5. #5
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    There doesn't seem to be anything wrong when hovering over it. Can you please describe in fuller detail what the problem is, and which version of IE you see it in?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  6. #6
    SitePoint Enthusiast
    Join Date
    May 2011
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I apologize. I disabled the effect for demonstration purposes to someone and forgot to enable it again. See if it works now if you could. Thanks.

  7. #7
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by kossae9000 View Post
    I apologize. I disabled the effect for demonstration purposes to someone and forgot to enable it again. See if it works now if you could. Thanks.
    I still don't see a problem. Can you please describe in fuller detail what the problem is, and which version of IE you see it in?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •