I have fixed my js but the item still softreject with this reason :
PROPER EVENT BINDING: Consider using the preferred .on() method rather than .click(), .bind(), .hover(), .load(), .resize(), etc. For best performance and concise code use event delegation whenever possible: https://codepen.io/32bitkid/post/understanding-delegated-javascript-events
can anyone please tell me what to improve
$(document).ready(function(){
"use strict";
/*
==============================================================
Main Banner SLIDER SCRIPT
==============================================================
*/
if($('.mg_slider1').length){
$('.mg_slider1').slick({
fade:true,
autoplay: true,
autoplaySpeed: 1200,
});
}
/*
==============================================================
Main Banner SLIDER SCRIPT
==============================================================
*/
if($('.slider').length){
$('.slider').slick({
fade:true,
autoplay: true,
autoplaySpeed: 1200,
});
}
/*
==============================================================
Main Banner SLIDER SCRIPT
==============================================================
*/
if($('.bs-project-slider').length){
$('.bs-project-slider').slick({
fade:true,
autoplay: false,
autoplaySpeed: 1200,
});
}
/*
==============================================================
Main Banner SLIDER SCRIPT
==============================================================
*/
if($('.testimonial-slider').length){
$('.testimonial-slider').slick({
dots:false,
fade:true,
arrows:true
});
}
/*
============================================================
Counter Javascript
============================================================
*/
if ($('.counter').length) {
$('.counter').counterUp({
delay: 10,
time: 1000
});
}
/*
==============================================================
SLICK SLIDER MULTIPUL SCRIPT
==============================================================
*/
if($('.brand-slider').length){
$('.brand-slider').slick({
centerMode: true,
centerPadding: '0px',
slidesToShow: 6,
arrows: false,
responsive: [
{
breakpoint: 1367,
settings: {
arrows: false,
centerMode: true,
centerPadding: '0px',
slidesToShow: 4
}
},
{
breakpoint: 992,
settings: {
arrows: false,
centerMode: true,
centerPadding: '0px',
slidesToShow: 3
}
},
{
breakpoint: 768,
settings: {
arrows: false,
centerMode: true,
centerPadding: '0px',
slidesToShow: 2
}
},
{
breakpoint: 481,
settings: {
arrows: false,
centerMode: false,
centerPadding: '0px',
slidesToShow: 1
}
}
]
});
}
/*
==============================================================
SLICK SLIDER MULTIPUL SCRIPT
==============================================================
*/
if($('.feature-thumb-slider').length){
$('.feature-thumb-slider').slick({
centerMode: true,
centerPadding: '0px',
slidesToShow: 3,
arrows: true,
responsive: [
{
breakpoint: 1367,
settings: {
arrows: false,
centerMode: true,
centerPadding: '0px',
slidesToShow: 3
}
},
{
breakpoint: 992,
settings: {
arrows: false,
centerMode: true,
centerPadding: '0px',
slidesToShow: 2
}
},
{
breakpoint: 768,
settings: {
arrows: false,
centerMode: true,
centerPadding: '0px',
slidesToShow: 1
}
},
{
breakpoint: 481,
settings: {
arrows: false,
centerMode: false,
centerPadding: '0px',
slidesToShow: 1
}
}
]
});
}
/*
==============================================================
Comment Wrap Script Start
==============================================================
*/
if($('.comment-wrap').length){
$( ".comment-wrap" ).closest('section').css( "overflow", "hidden" );
}
/*
==============================================================
File Upload Script Start
==============================================================
*/
if($('.fileUpload,.ab-submit').length){
$( ".fileUpload,.ab-submit" ).parent().css( "position", "relative" );
}
/*
==============================================================
DL Responsive Menu
==============================================================
*/
if(typeof($.fn.dlmenu) == 'function'){
$('#mg-responsive-navigation').each(function(){
$(this).find('.dl-submenu').each(function(){
if( $(this).siblings('a').attr('href') && $(this).siblings('a').attr('href') != '#' ){
var parent_nav = $('<li class="menu-item mg-parent-menu"></li>');
parent_nav.append($(this).siblings('a').clone());
$(this).prepend(parent_nav);
}
});
$(this).dlmenu();
});
}
/*
============================================================
Masonry Gallery Javascript
============================================================
*/
if ($('.masonry').length) {
$(".masonry").imagesLoaded(function() {
$(".masonry").masonry();
});
}
if ($('.items-grid').length) {
var fselector = 0,
itemsGrid = $(".items-grid");
(function($) {
"use strict";
var isotopeMode;
if (itemsGrid.hasClass("masonry")) {
isotopeMode = "masonry";
} else {
isotopeMode = "fitRows"
}
itemsGrid.imagesLoaded(function() {
itemsGrid.isotope({
itemSelector: '.mix',
layoutMode: isotopeMode,
filter: fselector
});
});
$(".port-filter").on('click', '.filter', function() {
$(".filter").removeClass("active");
$(this).addClass("active");
fselector = $(this).attr('data-filter');
itemsGrid.isotope({
itemSelector: '.mix',
layoutMode: isotopeMode,
filter: fselector
});
return false;
});
})(jQuery);
}
if ($('#items-grid2').length) {
var fselector = 0,
itemsGrid = $("#items-grid2");
(function($) {
"use strict";
var isotopeMode;
if (itemsGrid.hasClass("masonry")) {
isotopeMode = "masonry";
} else {
isotopeMode = "fitRows"
}
itemsGrid.imagesLoaded(function() {
itemsGrid.isotope({
itemSelector: '.mix',
layoutMode: isotopeMode,
filter: fselector
});
});
$(".port-filter").on('click', '.filter', function() {
$(".filter").removeClass("active");
$(this).addClass("active");
fselector = $(this).attr('data-filter');
itemsGrid.isotope({
itemSelector: '.mix',
layoutMode: isotopeMode,
filter: fselector
});
return false;
});
})(jQuery);
}
if ($('#projects-grid').length) {
var fselector = 0,
itemsGrid = $("#projects-grid");
(function($) {
"use strict";
var isotopeMode;
if (itemsGrid.hasClass("masonry")) {
isotopeMode = "masonry";
} else {
isotopeMode = "fitRows"
}
itemsGrid.imagesLoaded(function() {
itemsGrid.isotope({
itemSelector: '.mix',
layoutMode: isotopeMode,
filter: fselector
});
});
$(".port-filter").on('click', '.filter', function() {
$(".filter").removeClass("active");
$(this).addClass("active");
fselector = $(this).attr('data-filter');
itemsGrid.isotope({
itemSelector: '.mix',
layoutMode: isotopeMode,
filter: fselector
});
return false;
});
})(jQuery);
}
/*
=======================================================================
Map Script
=======================================================================
*/
if($('#map-canvas').length){
google.maps.event.addDomListener(window, 'load', initialize);
}
});
/*
=======================================================================
Map Custom Style Script Script
=======================================================================
*/
function initialize() {
"use strict";
var MY_MAPTYPE_ID = 'custom_style';
var map;
var brooklyn = new google.maps.LatLng(40.6743890, -73.9455);
var featureOpts = [
{
"featureType": "administrative",
"elementType": "all",
"stylers": [
{
"saturation": "-100"
}
]
},
{
"featureType": "administrative.province",
"elementType": "all",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "landscape",
"elementType": "all",
"stylers": [
{
"saturation": -100
},
{
"lightness": 65
},
{
"visibility": "on"
}
]
},
{
"featureType": "poi",
"elementType": "all",
"stylers": [
{
"saturation": -100
},
{
"lightness": "50"
},
{
"visibility": "simplified"
}
]
},
{
"featureType": "road",
"elementType": "all",
"stylers": [
{
"saturation": "-100"
}
]
},
{
"featureType": "road.highway",
"elementType": "all",
"stylers": [
{
"visibility": "simplified"
}
]
},
{
"featureType": "road.arterial",
"elementType": "all",
"stylers": [
{
"lightness": "30"
}
]
},
{
"featureType": "road.local",
"elementType": "all",
"stylers": [
{
"lightness": "40"
}
]
},
{
"featureType": "transit",
"elementType": "all",
"stylers": [
{
"saturation": -100
},
{
"visibility": "simplified"
}
]
},
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"hue": "#ffff00"
},
{
"lightness": -25
},
{
"saturation": -97
}
]
},
{
"featureType": "water",
"elementType": "labels",
"stylers": [
{
"lightness": -25
},
{
"saturation": -100
}
]
}
];
var mapOptions = {
zoom: 12,
center: brooklyn,
mapTypeControlOptions: {
mapTypeIds: [google.maps.MapTypeId.ROADMAP, MY_MAPTYPE_ID]
},
zoomControl: false,
scaleControl: false,
scrollwheel: false,
disableDoubleClickZoom: true,
mapTypeId: MY_MAPTYPE_ID
};
map = new google.maps.Map(
document.getElementById('map-canvas'),
mapOptions
);
var styledMapOptions = {
name: 'Custom Style'
};
var customMapType = new google.maps.StyledMapType(featureOpts, styledMapOptions);
map.mapTypes.set(MY_MAPTYPE_ID, customMapType);
}