I am encountering an issue where a dragged element goes outside of the body. Is there a way to prevent this so that it stays inside the body?
<div id="drag" style="background-color:red;">
<fieldset>
<h2 class="fs-title">Login</h2>
<h3 class="fs-subtitle"></h3>
<input name="UserName" type="text" placeholder="Username">
<input name="Password" type="password" placeholder="Password">
<input type="button" name="next" class="next action-button" value="New User" />
<input type="submit" name="next" class="nexts action-login" value="Log in" />
</fieldset>
</div>
}
<script type="text/javascript">
$(function () {
$("#drag").draggable();
});
</script>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
@Scripts.Render("~/bundles/jqueryui")
}