DevAdmin
DevAdmin

Reputation: 33

How to replace text inside the non-standard <nobr>

Adobe is using an ancient and nonstandard nobr HTML tag in Adobe Captivate 2019. The absence of IDs doesn't help either.

...

<div class="tocSlideTitleHeading" style="height: 14px; width: 55px; color: rgb(255, 255, 255);" tabindex="-1">
<nobr>Slide Title</nobr>
</div>

...

I need to replace the static text "Slide Title" inside the nobr tag with something more appropriate to the task (or better yet - replace the entire nobr tag along with its content. I don't want to replace nobr globally quite yet, just this instance for now.)

Thanks

Upvotes: 1

Views: 342

Answers (1)

matthias_h
matthias_h

Reputation: 11416

If you want it to be replaced upon loading the document, this would do it:

$(document).ready(function() {
   $(".tocSlideTitleHeading nobr").replaceWith("<span>New Title</span>");
});

And if you would like to just replace the text inside the <nobr> tag instead of replacing it completely:

 $(document).ready(function() {
    $(".tocSlideTitleHeading nobr").text("New Title");
 });

Upvotes: 0

Related Questions