Resize window removeClass / addClass

Resize window removeClass / addClass

Hi everyone, I'm really super new to coding and after some classes at codecademy I'm now doing some exercises on my own to eventually build up my own website. 

At the moment I'm trying to have js remove a class from a div and add a second class according to the window width (obviously, unsuccessfully)

Here's my attempt

  1. $(window).resize(function(){
  2. var st = $('.standard');
  3. var al = $('.align-left');

  4. if ($(window).width() < 600) {
  5. st.removeClass('standard');
  6. st.addClass('align-left');
  7. }
  8. });

  9. $(document).ready(main);
On the html file I've included the following just before the closing </body> tag and my js file is saved as app.js in the main folder. 
  1. <scrpt src="//"></script>
  2.     <script src="app.js"></script>

Hope to find some answers! I thank you in advance for your help!