Issue with Superfish Destroy function

Issue with Superfish Destroy function

I am trying to have the Superfish function destroy itself on screens less than 600px. I think I have the solution but it only works on Firefox, the other browsers I have tried it on (chrome, safari, and opera), the superfish does not get destroyed.

The site I am developing is currently on a local dev environment so I cannot link to the site but here is the code I am using. Also, it is built on Wordpress.

my superfish.min.js file is version 1.7.4 and my function is as follows

  1. /* 
  2.  * Custom Responsive Superfish settings
  3.  */

  4. jQuery(document).ready(function($){
  5.     var breakpoint = 600;
  6.     var sf = $('ul.nav-menu');
  7.     if($(document).width() >= breakpoint){
  8.         sf.superfish({
  9.             delay: 200,
  10.             speed: 'fast'
  11.         });
  12.     }
  13.     $(window).resize(function(){
  14.         if($(document).width() >= breakpoint & !sf.hasClass('sf-js-enabled')){
  15.             sf.superfish({
  16.                 delay: 200,
  17.                 speed: 'fast'
  18.             });
  19.         } else if($(document).width() < breakpoint) {
  20.             sf.superfish('destroy');
  21.         }
  22.     });
  23. });              


Any ideas on why its working in Firefox but not Chrome, Safari, or Opera?