diff --git a/README.md b/README.md index 04ec291..512f45a 100644 --- a/README.md +++ b/README.md @@ -27,21 +27,23 @@ file a bug. ## Usage - // create the morph object - var morph = Metamorph("HI!"); +```javascript +// create the morph object +var morph = Metamorph("HI!"); - // insert it into the DOM - $("#foo").html(morph.outerHTML()); +// insert it into the DOM +$("#foo").html(morph.outerHTML()); - // replace the contents - morph.html("BYE!"); +// replace the contents +morph.html("BYE!"); - // remove the morph - morph.remove(); +// remove the morph +morph.remove(); - // append the morph to an existing element, useful when - // manually creating morphs and not using a templating library - morph.appendTo(document.getElementById('foo')); +// append the morph to an existing element, useful when +// manually creating morphs and not using a templating library +morph.appendTo(document.getElementById('foo')); +``` ## Notes @@ -56,16 +58,18 @@ insert an `
  • ` into a `