toggle class for each item with only one function

toggle class for each item with only one function

Hi !

I have many boxes with same class :
  1. <img data-id="1" src="showhide.svg"/><div data-id="1" class="box"></div>
  2. <img data-id="2" src="showhide.svg"/><div data-id="2" class="box"></div>
  3. <img data-id="2" src="showhide.svg"/><div data-id="3" class="box"></div>
When I click on one img I want to toggle class   for the  box  with the same data-id  (no idea  how many boxes I have and what data-id it is)

to get :
  1. <img data-id="1" src="showhide.svg"/><div data-id="1" class="box expand"></div>
if I click a second time expand should be removed:
  1. <img data-id="1" src="showhide.svg"/><div data-id="1" class="box"></div>


thanks for helping