Skip to main content
added 1 character in body
Source Link
jfriend00
  • 706.4k
  • 103
  • 1k
  • 1k

As Barmar said, the use strict is optional, but if you had to place it somewhere the best place I would say you should put it is

$(function(){
    "use strict"strict";
    $('.nav-toggle').on('click',function(){
    
        $('.main-nav').toggleClass('open');
    });
});

This is where you have to put it whether you use Jquery or Javascript

As Barmar said, the use strict is optional, but if you had to place it somewhere the best place I would say you should put it is

$(function(){
    "use strict"
    $('.nav-toggle').on('click',function(){
    
        $('.main-nav').toggleClass('open');
    });
});

This is where you have to put it whether you use Jquery or Javascript

As Barmar said, the use strict is optional, but if you had to place it somewhere the best place I would say you should put it is

$(function(){
    "use strict";
    $('.nav-toggle').on('click',function(){
    
        $('.main-nav').toggleClass('open');
    });
});

This is where you have to put it whether you use Jquery or Javascript

fix misspellings, better code indentation
Source Link
Barmar
  • 779.2k
  • 56
  • 542
  • 655

As BarmerBarmar said, the use strict is optional, but if you had to place it somewhere the best place I would say you should put it is

$(function(){
    "use strict"
    $('.nav-toggle').on('click',function(){
    
        $('.main-nav').toggleClass('open');
    }); 
});

This is where you have to put it weatherwhether you use Jquery or Javascript

As Barmer said, the use strict is optional, but if you had to place it somewhere the best place I would say you should put it is

$(function(){
"use strict"
$('.nav-toggle').on('click',function(){

    $('.main-nav').toggleClass('open');
});});

This is where you have to put it weather you use Jquery or Javascript

As Barmar said, the use strict is optional, but if you had to place it somewhere the best place I would say you should put it is

$(function(){
    "use strict"
    $('.nav-toggle').on('click',function(){
    
        $('.main-nav').toggleClass('open');
    }); 
});

This is where you have to put it whether you use Jquery or Javascript

Source Link
JKer
  • 88
  • 4

As Barmer said, the use strict is optional, but if you had to place it somewhere the best place I would say you should put it is

$(function(){
"use strict"
$('.nav-toggle').on('click',function(){

    $('.main-nav').toggleClass('open');
});});

This is where you have to put it weather you use Jquery or Javascript