I am using a jquery script to change strings to something else based on the divs initial string as well as adding an extra class to the element. Works great.
However, I just got in a situation that I need to be able to target a few divs based in a string in the sites title tags when a special users logg in thus the title change.
Is this possible? Both Vanilla JS and jQuery is good for me.
Script I am using:
$( "span.conditionHilite:contains('Standard')" )
.text('Approved Selection').addClass( "approvedSelectionHilite" );
I would like to run that script ONLY if the title contains a certain string.
title? What value are you trying to get fromtitle, and what do you want to do with it?