Dynamically changing the jQuery sortable placeholder value
<p>How do I use an if statement in the jQuery sortable plugin to dynamically determine the placeholder class?<br/><br/>
If the item is being dragged around in <code>#listA</code> then I want the placeholder class to be <code>.ImInListA</code><br/>
If the item is being dragged around in <code>#listB</code> then I want the placeholder class to be <code>.ImInListB</code></p>

<p><br/>
jQuery</p>

<pre><code>$( "#listA, #listB" ).sortable({
    connectWith: ".connected_sortable",
    placeholder:
    //if the current item is being dragged in #listA
    //use css class selector .ImInListA
    //else
    //use css class selector .ImInListB
}).disableSelection();
</code></pre>

<p>HTML:</p>

<pre><code>&lt;ul id="listA" class="connected_sortable"&gt;
  &lt;li value="1"&gt;list_a_1&lt;/li&gt;
&lt;/ul&gt;

&lt;ul id="listB" class="connected_sortable"&gt;
  &lt;li value="2"&gt;list_b_2&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>Thanks!</p>
