Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Take A QuizChallenge yourself and boost your learning! Start the quiz now to earn credits.
Take A QuizUnlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Take A QuizCourse Queries Syllabus Queries 3 years ago
User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
You have the exact right idea, and your code should work as expected. However, your conditional to check whether the user is an admin should really come inside of your $(document).ready(). Having said that, it will still trigger the way you have it now.
As such, there can only be two possible things causing your script not to work for you:
Including jQuery and substituting the condition for one that is always true shows the name change working, as can be seen in the following example:
$(document).ready(href="https://forum.tuteehub.com/tag/function">function() {
if (1) {
document.querySelector('#section-tabs a.context_external_tool_375').innerHTML = "Syllabus";
}
});
id="left-side" class="ic-app-course-menu list-view" style="display: block">
id="section-tabs-header-subtitle" class="ellipsis">Sandbox
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
manpreet
Best Answer
3 years ago
I've tried a few different ways to change the title of a link within the navigation block through Javascript, but to no avail.
Is there something that I am missing?
Here's the original code via the site:
Here is the Javascript I'm using to attempt to change the title "Course Syllabus" to just "Syllabus"