[UI] Sortable : bug avec IE
Bonjour à tous,
J'utilise Jquery UI sortable :
http://demo.wil-linssen.com/jquery-sortable-ajax/
J'ai utilisé l'exemple de ce site :
http://demo.wil-linssen.com/jquery-sortable-ajax/
Le problème est que ça ne fonctionne pas avec Internet Explorer.
J'ai donc fait une recherche sur google, j'ai trouvé ce post :
http://stackoverflow.com/questions/1...789775#1789775
Le fait d'ajouter ce code ne permet pas de faire fonctionner le plugin sous IE.
Auriez-vous une idée svp ? auriez-vous déjà rencontré ce problème ?
Voici mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| <ul id="test-list">
<?php
$i=0;
$sql = "SELECT * FROM neuro_event WHERE patient_id = '".$_SESSION['dmu']."' ORDER BY position ASC";
$req = mysql_query($sql) or die(mysql_error());
while($d = mysql_fetch_assoc($req)){
$i++;
?>
<?php echo '<li id="listItem_'.$d['id'].'"><img src="arrow.png" alt="move" width="16" height="16" class="handle" /><strong>'.$d['id'].'</strong></li>'; ?>
<?php
}
?>
</ul> |
Code js :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <script type="text/javascript">
// When the document is ready set up our sortable with it's inherant function(s)
$(document).ready(function() {
$("#test-list").sortable({
handle : '.handle',
update : function () {
var order = $('#test-list').sortable('serialize');
alert(order);
$("#info").load("process-sortable.php?"+order);
$('test-list').bind('mousedown', function(e) {
e.stopPropagation();
});
}
});
});
</script> |
et le code PHP pour la mise à jour de la table :
Code:
1 2 3 4 5 6 7 8 9 10
| <?php
include('includes/connexion.php');
foreach ($_GET['listItem'] as $position => $item) :
$sql= "UPDATE `neuro_event` SET `position` = $position WHERE `id` = $item";
echo $sql;
mysql_query($sql);
endforeach;
?> |
Merci d'avance.
beegees