Skip to content
Advertisement

Replace class from span tag HTML DOM

I am trying to replace and add some value in the HTML class… I am success in solving this issue to some extent but now I need help. Here is my function code

JavaScript

this code currently output this modified Html Code

JavaScript

enter image description here

And Now I Also want to replace the class of <span class="page-numbers current"> to <span class="pagination-link is-current "> so that it looks like this
enter image description here

I am also trying to remove <li></li> tag from the next and previous page button. any type of help will greatly be appreciated

Advertisement

Answer

After a some experiment with my code I solved my question. Here is my code…

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement