Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #43826

    Christian
    Moderator

    Yes, please see (http://prntscr.com/3is4gy).

    Hope that helps. 🙂

    #44373

    Jeremy T
    Participant

    Thanks. Whenever this class is used for another page’s content band, the link stops working. It looks like a link but doesn’t function. If I take away the class the links works, but the animation and alignment is off.

    I’m trying to use the class for menu items and buttons that link to locations on other pages (#x-content-band-n).

    Any ideas? Does the JavaScript need to be modified?

    /Jeremy

    #44761

    Alexander
    Keymaster

    Hi Jeremy,

    Go to your child theme and find the code we added. You’ll need to modify it further to suit your needs. Look at this line:

    $('.x-scroll-to-content-band-title').click(function(e){

    Whatever is passed to jQuery in those quotes will be targeted. The function is expecting the item clicked to be a link.

    When added a custom class to a menu item, WordPress places this on the li element, and not the a element. Try replacing the selector with the one from this code:

    $('li.x-scroll-to-content-band-title a, a.x-scroll-to-content-band-title').click(function(e){

    That should target anytime the class is attached to a button, or a menu item.

    #44824

    Jeremy T
    Participant

    It makes sense that a list item would need to be handled differently as it uses ‘li’ elements rather than ‘a’ as links and buttons use.

    However, the key remaining issue is that a link, button or menu item with the class x-scroll-to-content-band-title active does not function when the link refers to another page. For example if I want a link on page /services to go to a location on another page /support/#x-content-band-3 the link doesn’t function. The code only seems to work within a single page. If I remove the class it at least goes to the other page, but without jscript animation or alignment.

    What am I missing?
    Thanks for your continued help!

    /Jeremy

    #45136

    Alexander
    Keymaster

    Hi Jeremy,

    Yes, it only works within a single page. It’s intended for One Page navigation. Right now X isn’t setup for a blended navigation where target elements across various pages. It will just jump straight to the content. This is something we’re looking into for future development.

    #743151

    Nick
    Participant

    I’m having the same problem with two pages where I want to cross-link contact info in a directory page (http://atlas.colorado.edu/people-2/people/#gross) with the individual’s bio (http://atlas.colorado.edu/people-2/faculty/#gross). I’d be grateful for help.
    Nick

    #743163

    Nick
    Participant

    Just to clarify, the cross-linking works, it just scrolls a little too far, leaving the target text covered by the menu bar. I want to tweak this so it doesn’t scroll so far down. Thanks, Nick

    #743541

    Friech
    Moderator

    Hi Nick,

    Is this the element that you need to link your anchor?

    <a name="gross"></a>

    If so, please update that to

    
    <a id="gross"></a>

    Hope it helps, Cheers!

    #744575

    Nick
    Participant

    That didn’t work. Let me clarify what I’m trying to do.

    I work at a university and for our department we have a page of faculty bios and another page includes faculty/staff contact info. To link these listings, I want to use URLs+anchors. However, like others have reported above, the page scrolls too far down the page. For example, this link to Mark Gross’ bio (http://atlas.colorado.edu/people-2/faculty/#gross) results in a page where info about Mark Gross is obscured (see attached screenshot).

    I would appreciate your help in how to fix this issue.

    Thanks, Nick

    #744584

    Nick
    Participant

    BTW, for some reason when I changed the anchor as recommended (using id instead of name) this nearby link [Contact] stopped working.

    #744910

    Rad
    Moderator

    Hi Nick,

    It’s not changed, they still displayed as name on my end.

    About the content band’s getting cut off, it’s a normal behavior of linked anchor. It’s not getting cut off, it simply position the on the very top of the page and it just happens that the navbar is floating. Hence, creating the cutoff look.

    For the fix, you have to manually create the script for positioning, that script should include navbar’s height along with the calculation. And that fix is included from X latest version. You’re currently on old versions which explain why it’s not working. Please update your X theme and its plugin.

    Thanks.

    #745167

    Nick
    Participant

    As I explained above, adding “id” instead of “name” actually broke a nearby link (which referenced an identical anchor in a different page), so I changed it back to “name”.

    However, I figured out a workaround that involves making anchor names in the different pages unique. This yields acceptable results.

    Thanks for the help.

    Nick

    #745221

    John Ezra
    Member

    Glad you got it to work and for sharing your workaround. Have a wonderful day! 🙂