I am using this function for drag n drop. Calling this function onmousedown event. It does not work when i did mouse down for the first time but it works perfectly fine from the second mouse down event. Can anyone tell me how can i make it work for the first time??
function DivMouseDown(id) { alert("id:" +id); //alert(" i m in DivMouseDown"); try {
jQuery('#'+ id).draggable({ opacity: 0.5, revert: 'invalid', drag:function(ev,ui) { //alert("i m draggable"); } }); }
catch (e) {
alert ("exception in DIVmouse down: "+ e); }