Saturday, 15 August 2015

javascript - jquery replace is not working -


Hi trying to remove the arrow from JS but it seems that the replacement work Not doing: - (

  & lt; a class = "PR-page-first" & gt; «previous  

You are changing the text but not the content of the element.

When you call $ ('.pr-page-prev') Text () , this text returns the subject on which you are calling the place that will return the replaced text, but it will not be set back to the element, so even if you have read If it has changed it will not apply to this element.

  $ ('.pr-page-prev'). Text (function (i, text) {return text.replace (/ , '')}) $ ('.pp-page-next'). Text (function (i, text) {return text.replace (/ »/, '')})  
< P> Demo:


No comments:

Post a Comment