javascript - jQuery wrap only around string -
I'm working on some jQuery code to start
In
& lt; Block & gt; & Lt; X & gt; Citation & lt; / X & gt; & Lt; Cite & gt; Author & lt; / Cite & gt; & Lt; / Blockquote & gt;
So far, I'm trying to loop through each block quote, by separating the element, using the jQueries wrapInner function to wrap the remaining string in the element, then the element Add again.
Edit: The ultimate goal is to do something like this. In addition to using jQuery to automate the appointment of .bqstart; .bqend
I'm new to javascript jQuery, though I have experience in many other coding languages, so I'm not sure how to implement it and if it is to get me to meet it correctly is . Hey, I'm not even sure the title of this question is justified. Some guidance would be greatly appreciated: P
EDIT2: For anyone in the future, or anyone curious, here's the code that I have ended
You can check the node type
to childNode
s, if the value is 3, the node is one textNode
.
$ ('blockquote'). material (). Filter (function () {return.nodeType === 3 & trim (this.nodeValue) .length;}). Wrap ('& lt; q / & gt;');
Comments
Post a Comment