is there any javascript method to get text, and split it after a certain value?
Like for instance, having:
<p>here is some text <!-- read more --> and here is some more</p>
get this:
<p>here is some text</p> <p>and here is some more</p>
I suppose jQuery don’t have the tools to achieve this.
JavaScript and jQuery can absolutely achieve this. Working example: http://jsfiddle.net/Brdk2/
Here’s the code:
The
.split()and.join()methods above are native JS. All other methods are jQuery. Let me know what questions you have.