Guest User

Untitled

a guest
Jul 23rd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. jQuery.Deferred exception: Cannot read property 'on' of undefined TypeError: Cannot read property 'on' of undefined
  2. at initCustomDropdown (http://localhost/wordpress/wp-content/themes/****/lib/js/custom.js:116:15)
  3. at HTMLDocument.<anonymous> (http://localhost/wordpress/wp-content/themes/****/lib/js/custom.js:45:2)
  4. at l (http://localhost/wordpress/wp-content/themes/jessica/lib/js/jquery-3.3.1.min.js:2:29375)
  5. at c (http://localhost/wordpress/wp-content/themes/****/lib/js/jquery-3.3.1.min.js:2:29677) undefined
  6.  
  7. function initCustomDropdown()
  8. {
  9. if($('.custom_dropdown_placeholder').length && $('.custom_list').length)
  10. {
  11. var placeholder = $('.custom_dropdown_placeholder');
  12. var list = $('.custom_list');
  13. }
  14.  
  15. placeholder.on('click', function (ev)
  16. {
  17. if(list.hasClass('active'))
  18. {
  19. list.removeClass('active');
  20. }
  21. else
  22. {
  23. list.addClass('active');
  24. }
  25.  
  26. $(document).one('click', function closeForm(e)
  27. {
  28. if($(e.target).hasClass('clc'))
  29. {
  30. $(document).one('click', closeForm);
  31. }
  32. else
  33. {
  34. list.removeClass('active');
  35. }
  36. });
  37.  
  38. });
  39.  
  40. $('.custom_list a').on('click', function (ev)
  41. {
  42. ev.preventDefault();
  43. var index = $(this).parent().index();
  44.  
  45. placeholder.text( $(this).text() ).css('opacity', '1');
  46.  
  47. if(list.hasClass('active'))
  48. {
  49. list.removeClass('active');
  50. }
  51. else
  52. {
  53. list.addClass('active');
  54. }
  55. });
  56.  
  57.  
  58. $('select').on('change', function (e)
  59. {
  60. placeholder.text(this.value);
  61.  
  62. $(this).animate({width: placeholder.width() + 'px' });
  63. });
  64. }
  65.  
  66. initCustomDropdown();
  67. initPageMenu();
  68. initDealsSlider();
  69. initTabLines();
  70. initFeaturedSlider();
  71. featuredSliderZIndex();
  72. initPopularSlider();
  73. initBanner2Slider();
  74. initFavs();
  75. initArrivalsSlider();
  76. arrivalsSliderZIndex();
  77. bestsellersSlider();
  78. initTabs();
  79. initTrendsSlider();
  80. initReviewsSlider();
  81. initViewedSlider();
  82. initBrandsSlider();
  83. initTimer();
Add Comment
Please, Sign In to add comment