Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="desc">
- <a href="https://domain1.com/product-6456.html">Пример 1</a>
- <a href="/product-6456.html">Пример 2</a>
- <a href="https://domain1.com/product-12.html">Пример 3</a>
- <a href="https://newdomain.com/product-1-562.html">Пример 4</a>
- </div>
- $('#desc').children().each(function() {
- const value = $(this).attr('href')
- if ($(this).attr('href').indexOf('domain1') !== -1)
- $(this).attr('href', value.replace('domain1', 'some'))
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement