I am trying to make a default homepage script using the famous script for IE but I'm trying to add it in a jquery function.
So this works:
<a href="#" onClick="document.body.style.behavior='url(#default#homepage)';
  document.body.setHomePage('http://www.google.com');">
    Click here to make My Site your default homepage
  </a>
but this doesn't:
<a href="#" onClick="">
    Click here to make My Site your default homepage
  </a>
$('a').click(function() {
 document.body.style.behavior='url(#default#homepage)';
  document.body.setHomePage('http://www.google.com');
});
What I'm I doing wrong?
EDIT: Please note the on click function doesnt work for IE9. IE6,7 and 8 it works.