1) Best practice is to make new javascript file like my.js. Make this file into your js folder in root directory -> js/my.js .
2) In my.js file add your code inside of $(document).ready(function(){}) scope.
$(document).ready(function(){
$(“.icon-bg”).click(function () {
$(“.btn”).toggleClass(“active”);
$(“.icon-bg”).toggleClass(“active”);
$(“.container”).toggleClass(“active”);
$(“.box-upload”).toggleClass(“active”);
$(“.box-caption”).toggleClass(“active”);
$(“.box-tags”).toggleClass(“active”);
$(“.private”).toggleClass(“active”);
$(“.set-time-limit”).toggleClass(“active”);
$(“.button”).toggleClass(“active”);
});
$(“.button”).click(function () {
$(“.button-overlay”).toggleClass(“active”);
});
$(“.iconmelon”).click(function () {
$(“.box-upload-ing”).toggleClass(“active”);
$(“.iconmelon-loaded”).toggleClass(“active”);
});
$(“.private”).click(function () {
$(“.private-overlay”).addClass(“active”);
$(“.private-overlay-wave”).addClass(“active”);
});
});
3) add your new js file into your html
Before the closing body tag add this (reference to jQuery library). Other hosted libraries can be found here
And this
It should look something like this
……..
……..