jQuery replace div based on rel attribute
<p>I'm trying to replace a div based on a class name and a rel attribute. </p>

<pre><code>   &lt;script type="text/javascript"&gt;

        $(function () {

            $('.special_button').click(function () {

                var num = $(this).attr('rel');

                $(button with class .value_button and rel=num).replaceWith("&lt;div class='value_button' &gt;" + $(this).val() + "&lt;/div&gt;");
                $('div.content_slide').slideUp(600);
            });
        });

    &lt;/script&gt;
</code></pre>

<p>How would you do this?</p>
