-
AuthorPosts
-
May 13, 2014 at 3:33 am #43826
Yes, please see (http://prntscr.com/3is4gy).
Hope that helps.
May 14, 2014 at 12:36 pm #44373Thanks. 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
May 15, 2014 at 9:03 am #44761Hi 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 thea
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.
May 15, 2014 at 12:26 pm #44824It 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
May 16, 2014 at 10:37 am #45136Hi 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.
January 12, 2016 at 3:13 pm #743151I’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.
NickJanuary 12, 2016 at 3:24 pm #743163Just 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
January 12, 2016 at 9:26 pm #743541Hi 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!
January 13, 2016 at 11:46 am #744575That 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
January 13, 2016 at 11:56 am #744584BTW, for some reason when I changed the anchor as recommended (using id instead of name) this nearby link [Contact] stopped working.
January 13, 2016 at 3:52 pm #744910Hi 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.
January 13, 2016 at 6:55 pm #745167As 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
January 13, 2016 at 7:29 pm #745221Glad you got it to work and for sharing your workaround. Have a wonderful day!
-
AuthorPosts