How to replace comma separated string with bullets in HTML template

Updated 2 years ago

If you have a comma separated list and you want to display it in an eBay listing as bullet points you can use the following javascript:

<script type="text/javascript">
function makeBullets(arg1) {
var visitorName = "</li><li>";
var myOldString = arg1;
var myNewString = "<ul><li>" + myOldString.split(",").join("</li><li>") + "</li></ul>";
return myNewString;

Then place the following script where you want the bullets to display in the HTML:

<script type="text/javascript">
var origtext = makeBullets("#?Content?#")

How did we do?

Explore our brands and social media
Skustack Memaila Turnstock WayToPay.Me Facebook Instagram Linkedin YouToube Twitter
Powered by HelpDocs (opens in a new tab)