After resizing the browser window, this function is not working on first time, but after reload the page, it works.
<script type="text/javascript">
if($(document).width() < 620){
$(document).ready(function(){
$(".flexy-menu").flexymenu({
speed: 400,type: "vertical", indicator: false
});
});
}
</script>
Why is it working only after reload ?
Have you considered to wait first for the document to be ready? You also missed the starting tag