Jquery - changing button to an image

is it possible to replace a jquery button with an image or text. Here’s the code below:

<script>

[B][U]Javascript[/U][/B]
$(document).ready(function(){
  $(".test .hide").replaceWith( "<a href"#">Test</a>" ).click(function(){
    $(this).parents(".test").fadeOut("slow");
  });
});

[B][U]html[/U][/B]
<div class="test">
<button class="hide">Hide</button>
<p>Test</p>
</div>
</script>

Any help would be great.

The main reason that the snippet you posted is not working is because of the double quotes in this:

"<a href"#">Test</a>"

Change it to use single quotes and add an equals sign:

"<a href='#'>Test</a>"

Does that help?