How to work on an object to which I added an event listener? [closed]
you need to provide a function as argument of dblclick :
$('#test').dblclick(() => {$('#test').css('background-color','red');});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="test">test</div>