[jQuery] click event and window.location problem in safari
Hello
I have a simple jquery code that will put a link (on click event) on a
division. The link is read from the anchor inside of the div:
$(document).ready(function() {
$("div.picture").click(function () {
var url = $(this).find("a").attr('href');
window.location = url;
});
});
This code will work fine in Firefox and IE, but in Safari it will
return user to the url:
http://someurl.com/http://someurl.com
instead of:
http://someurl.com
How to fix this?
Any ideas?
Thanks a lot for help!