Differenze tra le versioni di "Liste ordinabili in jQuery"

(Creata pagina con "← jQuery e Javascript Php: <pre> echo '<ul id="' . $ul_id . '" class="notes sortable" style="list-style: none; margin: 0;"></ul>'; </pre...")
 
 
Riga 3: Riga 3:
 
Php:
 
Php:
 
<pre>
 
<pre>
echo '<ul id="' . $ul_id . '" class="notes sortable" style="list-style: none; margin: 0;"></ul>';
+
echo '<ul id="ul_sortable" class="notes sortable" style="list-style: none; margin: 0;"></ul>';
 
</pre>
 
</pre>
 
Script:
 
Script:
 
<pre>
 
<pre>
$('ul#<?= $ul_id ?>').sortable( { placeholder: "ui-state-highlight" } );
+
$('ul#ul_sortable').sortable( { placeholder: "ui-state-highlight" } );
 
</pre>
 
</pre>

Versione attuale delle 20:02, 10 mag 2020

← jQuery e Javascript

Php:

echo '<ul id="ul_sortable" class="notes sortable" style="list-style: none; margin: 0;"></ul>';

Script:

$('ul#ul_sortable').sortable( { placeholder: "ui-state-highlight" } );