Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery.Deferred exception: Cannot read property 'on' of undefined TypeError: Cannot read property 'on' of undefined
- at initCustomDropdown (http://localhost/wordpress/wp-content/themes/****/lib/js/custom.js:116:15)
- at HTMLDocument.<anonymous> (http://localhost/wordpress/wp-content/themes/****/lib/js/custom.js:45:2)
- at l (http://localhost/wordpress/wp-content/themes/jessica/lib/js/jquery-3.3.1.min.js:2:29375)
- at c (http://localhost/wordpress/wp-content/themes/****/lib/js/jquery-3.3.1.min.js:2:29677) undefined
- function initCustomDropdown()
- {
- if($('.custom_dropdown_placeholder').length && $('.custom_list').length)
- {
- var placeholder = $('.custom_dropdown_placeholder');
- var list = $('.custom_list');
- }
- placeholder.on('click', function (ev)
- {
- if(list.hasClass('active'))
- {
- list.removeClass('active');
- }
- else
- {
- list.addClass('active');
- }
- $(document).one('click', function closeForm(e)
- {
- if($(e.target).hasClass('clc'))
- {
- $(document).one('click', closeForm);
- }
- else
- {
- list.removeClass('active');
- }
- });
- });
- $('.custom_list a').on('click', function (ev)
- {
- ev.preventDefault();
- var index = $(this).parent().index();
- placeholder.text( $(this).text() ).css('opacity', '1');
- if(list.hasClass('active'))
- {
- list.removeClass('active');
- }
- else
- {
- list.addClass('active');
- }
- });
- $('select').on('change', function (e)
- {
- placeholder.text(this.value);
- $(this).animate({width: placeholder.width() + 'px' });
- });
- }
- initCustomDropdown();
- initPageMenu();
- initDealsSlider();
- initTabLines();
- initFeaturedSlider();
- featuredSliderZIndex();
- initPopularSlider();
- initBanner2Slider();
- initFavs();
- initArrivalsSlider();
- arrivalsSliderZIndex();
- bestsellersSlider();
- initTabs();
- initTrendsSlider();
- initReviewsSlider();
- initViewedSlider();
- initBrandsSlider();
- initTimer();
Add Comment
Please, Sign In to add comment