title: Jquery get Desktop Notification when page loaded
body: <p>I use this code to get desktop notification on chrome by click on div</p>
  
  <pre><code>&lt;script&gt;
  function notify() {
  var havePermission = window.webkitNotifications.checkPermission();
  if (havePermission == 0) {
    // 0 is PERMISSION_ALLOWED
     var notification = window.webkitNotifications.createNotification(
    'http://i.stack.imgur.com/dmHl0.png',
    'Chrome notification!',
    'Here is the notification text'
  );
  
     notification.onclick = function () {
    window.open("http://stackoverflow.com/a/13328397/1269037");
    notification.close();
    }
    notification.show();
    } else {
    window.webkitNotifications.requestPermission();
   }
   }  
  &lt;/script&gt;
  
    &lt;div style="width: 300px; height: 300px; background: yellow" onclick="notify()"&gt;
    Cick here to notify
    &lt;/div&gt;
  </code></pre>
  
  <p>but when I changed <code>onclick</code> to <code>onload</code> not work</p>
  
  <p>I use jquery too in this code even using <code>click</code> event or <code>ready</code> 
  what is problem with that?</p>