Currently, the string is
Package A (123 queries) Package B (212 queries)
Is it possible to use jquery to split it into new line like
- Package A (123 queries)
- Package B (212 queries)
I was thinking to insert line break after each closing bracket. But not sure if it is appropriate.
Edit 1
In HTML
<ul class="list">
<li><span id="requested-package">@Model[0].regDescription[a]</span></li>
<li>Testing</li>
</ul>
Output - I want to make the Plan A in next line

Edit 2
var str = $('.hidden-package').text();
var line = str.replace(')', ') <br>');
$('.requested-package').html(line);
Current Output
I created a hidden field hidden-packageand from there I managed to get the text value using .text().
The problem now is it only replaces the first occurrence of closing bracket. How can I replace all the closing bracket with <br>. Thanks.
Solution
Managed to solve this by changing the code above to the below.
var str = $('.hidden-package').text();
var line = str.replace(/\)/g, ')<br>');
$('.requested-package').html(line);