How can I change the numbers in jQuery? [closed]

You can do this :

$('#A').val(function(_,h){ return h.replace(/(\S+)\s*/g,'[B]$1[/B]\n') })

It will also work if you have more elements in your jQuery object (for example with $('textarea')).

Browse More Popular Posts

Leave a Comment