title: Get clicked element with Jquery on Safari
body: <p>I'm trying to get the input element clicked on a form. I've two input type submit : one to save the form and the other to validate it. I need to know which button was clicked.</p>
  
  <p>It's work for all browsers except Safari. </p>
  
  <p>JS :</p>
  
  <pre><code>var target   = e.originalEvent.explicitOriginalTarget || e.relatedTarget || document.activeElement;
      var buttonId = $(target).id;
  
      if (buttonId  == "opSave") {
          //doSomething
      } else if (buttonId  == "opCreate") {
          //doSomething
      }
  </code></pre>
  
  <p>HTML :</p>
  
  <pre><code>&lt;input type='submit' onclick="void(0)" id="opSave" name='opSave' value='Save' /&gt;
  &lt;input type='submit' onclick="void(0)" id="opCreate" name='opCreate' value='Submit' /&gt;
  </code></pre>