Both parent and child elements have the ability to drag, how to prevent the events of the parent element.

both parent and child elements have drag-and-drop functions, how to write so that the respective drag-and-drop functions of parent and child elements do not affect each other.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/1.2.6/jquery.min.js"></script>
</head>

<body>
    <div class="container">
        <div class="bar"></div>
        <div class="poite"></div>
    </div>
    <script>
        $(".container").mousedown(function (event) {
          ...
            $(document.body).mousemove(function (event) {
                ....
            });
        });
        $(".bar").mousedown(function (event) {
          ...
            $(document.body).mousemove(function (event) {
                ....
            });
        });
        $(".poite").mousedown(function (event) {
          ...
            $(document.body).mousemove(function (event) {
                ....
            });
        });
    </script>
</body>

</html>

event.stopPropagation()

prevent events from bubbling

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3caf6-2b87d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3caf6-2b87d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?