I have written multiple functions in jQuery.
My client is saying, there are currently redundant events in your JavaScript. Please consolidate all the code that should occur within a single event.
I am still learning jQuery. Please help.
Thanks.
'use strict';
$(function() {
$( '.task-list' ).on( 'click', 'li.list', function() {
$(this).toggleClass('completed' );
});
});
$(function() {
setTimeout(function(){
$('body').addClass('loaded');
}, 3000);
});
$(function() {
$('[data-toggle="tooltip"]').tooltip();
$('[data-toggle="popover"]').popover();
});
$(function(){
$('.nav li.dropdown').hover(function() {
$(this).addClass('open');
}, function() {
$(this).removeClass('open');
});
});