Manipulate DOM?

can I use javascript to manipulate the DOM, and convert

<blockquote>
<h3>Where is the...?</h3>
<p>blah blah blah...</P>
<footer class='pull-right'>Jason Cannon on 2014-10-28 13:26:16</footer></blockquote>

to

<div class='panel panel-default'>
<div class='panel-heading'>
<h3 class='panel-title' style='margin-right:175px; font-size:150%'>Where is the...?</h3>
</div>
<table class='table table-bordered table-condensed' style='width:auto'>
<tr><td><span class='glyphicon glyphicon-user' style='margin:0 10px'></span>Post by Jason Cannon</td></tr>
<tr><td><span class='glyphicon glyphicon-time' style='margin:0 10px'></span>on 10/28/14 1:26 PM</td></tr>
</table>
<div class='panel-body comment more'>blah blah blah ... 
</div>
</div>

Yes indeed you can.
The easiest way is if you pass the text in to a function that creates the top example, for then the same text can be passed to a separate function that will create the bottom example.

Is that type of use-case suitable for your situation?

There might be anm easier way to do this, im trying to get the post in
http://coronadoshores.ca/community/category.php?id=1&topic=Welcome
to look like the post,
http://coronadoshores.ca/community/post.php?id=3
(only the two replies would be blockquotes innside the div)

How did they do that from
http://www.phpjabbers.com/preview/stiva-forum/
to
http://www.phpjabbers.com/preview/stiva-forum/index.php?ac=loadReply&qid=4

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.