how to select drop down list based on <p> value
<p>Click form edit has trouble on drop down list</p>

<p>Dropdown list shows first item. I need to select value based on <code>&lt;p&gt;Professor&lt;p/&gt;</code></p>

<p>html</p>

<pre><code>&lt;p&gt;Title&lt;/p&gt;
&lt;p class='title'&gt;Professor&lt;/p&gt;
</code></pre>

<p>JQuery </p>

<pre><code>$('.title').click(function(){
    $(this).replaceWith('&lt;select class="title" name="title"&gt;&lt;option &gt;Please Select&lt;/option&gt;&lt;option value="Mr"&gt;Mr&lt;/option&gt;&lt;option value="Mrs"&gt;Mrs&lt;/option&gt;&lt;option value="Ms"&gt;Ms&lt;/option&gt;&lt;option value="Miss"&gt;Miss&lt;/option&gt;&lt;option value="Dr"&gt;Dr&lt;/option&gt;&lt;option value="Professor"&gt;Professor&lt;/option&gt;&lt;option value="Sir"&gt;Sir&lt;/option&gt;&lt;/select&gt;');
});​
</code></pre>

<p><a href="http://jsfiddle.net/sweetmaanu/U7rAc/3/" rel="nofollow"><strong>Demo</strong></a></p>
