Hi I am trying for hours now to remove a text string again after I have appended it.
I have a script that handles an accordion and I have some redundancy in text in
Change
$( "#redundant_text_wrapper").text().replace('redundantText','');
To:
$( "#redundant_text_wrapper").text().replace(redundantText,'');
Remove the quotes around the variable. That way it will be seen as a variable and not as a string.
Or
$("#redundant_text_wrapper").text($("#redundant_text_wrapper").text().replace(redundantText,''));
This way it will first get the text than replace it and set it.