Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <code> ... </code>
- <pre> ... </pre>
- $('code').replaceWith( "<pre>" + $('code').html() + "</pre>" );
- <code> A </code>
- <code> B </code>
- <code> C </code>
- <pre> A </pre>
- <pre> A </pre>
- <pre> A </pre>
- $('code').contents().unwrap().wrap('<pre/>');
- $('code').replaceWith(function(){
- return $("<pre />", {html: $(this).html()});
- });
- $('code').replaceWith(function(){
- return $("<pre />").append($(this).contents());
- });
- $('code').each(function() {
- $(this).replaceWith( "<pre>" + $(this).html() + "</pre>" );
- // this function is executed for all 'code' elements, and
- // 'this' refers to one element from the set of all 'code'
- // elements each time it is called.
- });
- $('code').each(function(){
- $(this).replaceWith( "<pre>" + $(this).html() + "</pre>" );
- });
- $('code').each(function () {
- $(this).replaceWith( "<pre>" + $(this).html() + "</pre>" );
- });
Add Comment
Please, Sign In to add comment