I need some help with the following code to bypass popup blockers when opening the new window. Basically this code transformY rotates an image on click and then after a delay opens a web page. It works fine, but popup blockers block it. I know there is a way to make it bypass that, but I'm still learning and don't know what I'm doing.
Current jQuery:
$(function rotate1(){
$("#rotate1").click(function() {
$("#rotate1").toggleClass("spinEffect");
setTimeout(function() {
window.open("http://google.com"); }, 1700); });
});
The html is:
<div id="rotate1"><img src="Placeholder.jpg" alt="Project 1"></div>
The css is:
.spinEffect{
transform: rotateY(360deg);
-webkit-transform: rotateY(360deg);
-ms-transform: rotateY(360deg);
transition: 1.5s;
}