.click only after alert?

.click only after alert?

I have multiple same iD's am try to get a 'rel' after click
HTML:
  1. <div class="konf_img_container_wrapper">
  2. <div class="konf_img_container">
  3. <div class="konf_img_thumb_xs">
  4. <div>
  5. <img src="useruploads_thumb/thumb_temp_54_505f0f8866d55.jpg" rel="10"> 
  6.                 <span id="remove-image" class="remove-image">  
  7.                 <span class="ui-icon ui-icon-trash"></span> </span>
  8. </div>
  9. </div>
  10. <div class="konf_img_thumb_xs">
  11. <div>
  12. <img src="useruploads_thumb/thumb_temp_54_505f0f9bf23b8.jpg" rel="11"> 
  13.                 <span id="remove-image" class="remove-image">  
  14.                 <span class="ui-icon ui-icon-trash"></span> </span>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
JS:
  1.  function enableHandlers() {
     alert("123"); //if this is remove the alert2 doesn't work

     $('.konf_img_thumb_xs').on('click','img', function () {
            var $img = $(this).parent().find('img').attr('rel');
            alert("img"+$img); //alert2
        });






  2. $(document).ready(function () {
       
        enableHandlers();
    });



if i remove the first alert (alert("123");) the click-alert doesnt work

Why, an how can i change this?