I am trying to load a window when the page is loaded. If I try to open the window using a button the code works.
I iam using:
$(document).ready(function() {
window.open ('http://google.com/', 'newwindow', config='height=720,width=1064, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no');
});
However, it is not load the window.
Any suggestion?
$(document).ready(function() {
window.open('http://google.com/', 'newwindow', config = 'height=720,width=1064, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no');
$('.open_webmail').click(function() {
window.open('http://google.com/', 'newwindow', config = 'height=720,width=1064, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no');
});
});
.open_webmail {
background-color: rgba(0, 124, 255, 0.7);
color: white;
font-size: 18px;
cursor: pointer;
-webkit-transition: all 550ms ease-in-out;
transition: all 550ms ease-in-out;
-moz-transition: all 550ms ease-in-out;
-o-transition: all 550ms ease-in-out;
-ms-transition: all 550ms ease-in-out;
display: inline-block;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 200px;
height: 100px;
margin: auto;
}
.open_webmail:hover {
background-color: rgba(163, 0, 255, 0.7);
color: #c5c5c5;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<button type="button" class="open_webmail">Login</button>