Disable Mouse Drag Event Using J QUERY
First write a function in j query
<script type="text/javascript">
$(document).ready(function(){
disableDrag(document.getElementById("Drag"));
});
function disableDrag (element){
element.draggable=false;
element.onmousedown=function(event){
event.preventDefault();
return false;
}
}
</script>
Then call the function in the ready function
Thank You
First write a function in j query
<script type="text/javascript">
$(document).ready(function(){
disableDrag(document.getElementById("Drag"));
});
function disableDrag (element){
element.draggable=false;
element.onmousedown=function(event){
event.preventDefault();
return false;
}
}
</script>
Then call the function in the ready function
Thank You
No comments:
Post a Comment