Closed hesperidium closed 3 years ago
Hi @hesperidium,
The first code snippet you posted, that works, correct? Ie, it changes the path button's text to 'NEW TEXT'?
If so, I'm not 100% sure what you're trying to do in the next snippet. Why can't 'NEW TEXT' simply say, 'Enter'?
Hi again, Craig, thanks for all your help!
So the first snippet is what I've been using to change the standard "Contents" path header (text only, not a link) to say something else. I've also used that same format to change the "Is tagged by" and "Has tags" defaults to custom text.
What I'm looking to do now is to customize the "Begin with 'X'" button that appears underneath the path via the line .appendTo(pathContents);
. The second snippet is the default code for the the "Begin with" button, but I'm not sure what pieces of that to integrate into the pageLoadComplete function, or if I am totally off on this strategy.
Would this work?
$(document).ready(function() {
$('body').on('pageLoadComplete',function() {
$('.path_of').prev().text('NEW TEXT');
$('.path_of').next().find('a').text('Enter');
});
});
That's IT! .next()
was the key. Thanks a million!
Attempting to customize "Begin with 'X'" button to say "Enter".
I've been starting with the script for customizing the relationships headers...
...and trying different updates to the last line/adding lines based on the HTML description of the button in question (.path_begin.nav_btn.primary and variations on this) and the '// "begin with" button' section of the scalarpage.jquery.js (below), but unsurprisingly these all-but-uneducated guesses have not led to any effects.
Thanks in advance for any assistance!!