I have tried every variation to replace the string, "sub events" with "selected. I haven't touched "sub events" yet but have affected everything around it.
This hid everything after it:
<script type="text/javascript">
$(function(){
$("div[class$=registrationDetails] > ul > li").text(function(){
var str = $(this).text("and the sub events").str.replace("sub events", "selected");
});
});
</script>
I tried the W3 School method, which I also found on another StackOverflow post, and it did nothing. This is the most basic form I tried with this method.
<script type="text/javascript">
var str1 = "and the sub events";
var str2 = str1.replace("sub events", "selected");
</script>
It seems so close yet won't just replace as it should. Thanks.
[class$=registrationDetails]when looking for an element with a class. Usediv.registrationDetails