I get the engine code:
<div class="tags"><a href="#">Pretty</a>, <a href="#">Good</a>, <a href="#">Creative</a></div>
I do not need a comma. How can I get rid of it with jQuery?
Yes, it would be possible to dig in dvzhik, but work for a public ...
I get the engine code:
<div class="tags"><a href="#">Pretty</a>, <a href="#">Good</a>, <a href="#">Creative</a></div>
I do not need a comma. How can I get rid of it with jQuery?
Yes, it would be possible to dig in dvzhik, but work for a public ...
Try this:
var text = $('.tags').html(); text = text.replace(',',''); $('.tags').html(text);
Connect jQuery for two lines of javascript?
var html = document.getElementsByClassName('tags')[0]; html.innerHTML = str.innerHTML.replace(/,/gi, '');
It is not completely clear what comma you need to remove. But in jQuery you can replace a specific block like this:
jQuery('селектор*').html('текст которым ты хочешь заменить');
Source: https://ru.stackoverflow.com/questions/176992/
All Articles