title: How to open modal by click <img > id
body: <p>I have a images gallery, I want to open a modal by click image and show images details like name, title, and description, I tried to alert message</p>
  
  <pre><code>&lt;img class="enent_inst" id="myImg" style="width:100%;" alt="&lt;?php echo 
  $events[$j]['title']; ?&gt;" src="&lt;?php echo base_url(); ?&gt;/Event_gallary/&lt;? 
  php echo $events[$j]['event_image']; ?&gt;" /&gt;
  </code></pre>
  
  <p>js side </p>
  
  <pre><code>$(document).on('click','#myImg',function(){
      alert('hello');
  });
  </code></pre>