I am having some trouble.

I am having some trouble.

I am trying to hide a div once the screen size reaches a certain point but it does not seem to be working. Here is my javascript.


        if($(window).innerWidth <= 768px){
            $('#id').hide()
        }