The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript $(“.current_page_item a”).position().left not working

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #30163


    I’m just fucked off at the moment :) Passed the last 2 hours to find where the problem is.

    The page:

    As you can see, at the beginning there are 14 px padding on the left. These disappear when hovering… but returns on mouse out.

    it seems that the $(“.current_page_item a”).position().left isn’t working cause when you change the menu, the css class “current_page_item” is set correctly, but nur “recognized” by jquery.

    The strange thing is I have a Demo page:

    There, everythings fine. Now I changed the site to a WP template … and I have what I described above.

    I checked the jquery file, the javascript file, the css file … everything identicaly.

    So where the hell is the error ?

    Thanks for help :)



    maybe it has something to do with jquery not running. Have you checked if any jquery code executes?


    have you checked the website ?

    If so, you would have seen that jquery is working fine.


    My first thoughts is there is a property being inherited by some upstream CSS stylesheet that WP uses. I noticed you are not using a full on CSS reset. Have you tried that?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.