I have a field that is dynamically being filled. I know that the first few words of the string are always going to be:
The order was manually edited:
This is followed by a list of all the edits that was made. This list can be somewhat long sometimes.
I want to hide the list of edits, and replace it with a button that says 'Click to View Edits'. When the user clicks the button it will make the list of edits appear above the button and will change the button text to 'Hide Edits'.
My thought-process was to use a jquery function to find "The order was manually edited:" and then select the rest of the string and save it into a variable, then I need make it hide the complete string and show the above string along with button. When the user clicks the button it will simply toggle the string that was saved into the variable(the list of edits).
The string I am searching in is
.note_message
I am somewhat lost how I can achieve this. I found the :contains selector but I wasn't sure how to select only the list of edits and not the string I am searching for. How can I go about doing what I am trying to do?