I have a function to check how many times click action is done on a div. This div has resized functionality. So when I try to resize it, that resize action got to count as clicked on that div. How I can avoid this resize click count.
let i = 0;
$(".resize").click(function(){
console.log(i++);
});
.resize {
color: rgb(0, 255, 255);
mix-blend-mode: difference;
margin: 0;
padding: 0;
width: 300px;
height: 300px;
border: 2px solid red;
resize: both;
overflow: auto;
}
/* Stack snippet specific CSS */
.as-console-wrapper {
position: initial !important;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="resize"></div>
I want not to increment the value of i
if div is resized. Only should increment the value of i
when clicked inside the border of the div.