<ul id='test'>
<li>
<div>
item1
<script type='text/javascript'>
alert
(0);
</script>
</div>
</li>
<li>
item2
</li>
</ul>
<script type = 'text/javascript'>
$
('#test').sortable({revert: true});
</script>
in the above example you will get two alert(0) popup which is undesired in my application.