I am trying to accomplish things on window.resize, but I cannot even alert to work more than once. All the code I have is:
HTML:
<head>
<meta charset="utf-8">
<script src="jquery-1.11.1.min.js"></script>//I have this library in this html file directory
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
window.resize(alert("yolo"));
});
</script>
</head>
<body>
...
</body>
I also tried several options:
window.resize(...)
window.on("resize",...)
window.one("resize",...)
$(window).resize(...)
$(window).on("resize",...)
$(window).one("resize",...)
none of them work. Is there anything else I have not tried ???
user3186555
source
share