Hi Jake,
thanks again for your reply.
I've worked out the syntax problems with inspector and also
realized that index.html wasn't loading jquery. So now it works!
I've modified a bit the code with a double if statement and it
works. I'm sure there're easier ways to trigger the same
result with fewer lines, but again, i'm really happy it works!
I just post here the code FYI
- var
main = function() {
-
$(window).resize(function() {
-
var st = $('.standard');
-
var al = $('.align-left');
-
-
if
($(window).width() < 600) {
-
st.removeClass('standard');
-
st.addClass('align-left');
-
}
-
-
if ($(window).width() > 600) {
-
al.removeClass('align-left');
-
al.addClass('standard');
- }
- });
-
- }
-
- $(document).ready(main);
Many thanks again for your help
a