jQuery(document).ready(function ($) { const prefix = 'absc_'; wp.customize(prefix + 'top_bar_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('.topbar-area').css({ 'background': '#50596C' }); } else { $('.topbar-area').css({ 'background': to }); } }); }); wp.customize(prefix + 'top_bar_txt_color', function (value) { value.bind(function (to) { if (''=== to) { $('.topbar-area:not(a)').css({ 'color': '#e8e8e8' }); } else { $('.topbar-area:not(a)').css({ 'color': to }); } }); }); wp.customize(prefix + 'top_bar_links_color', function (value) { value.bind(function (to) { if (''=== to) { $('.topbar-area a').css({ 'color': '#ffc80a' }); } else { $('.topbar-area a').css({ 'color': to }); } }); }); /******************** * * HEADER_STYLES *********************/ /* header_bg_color header_title_color header_title_hover_color header_tagline_color header_menu_item_color header_menu_current_item_border */ wp.customize(prefix + 'header_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('#header').css({ 'background': '#ffffff' }); } else { $('#header').css({ 'background': to }); } }); }); wp.customize(prefix + 'header_title_color', function (value) { value.bind(function (to) { if (''=== to) { $('.site-title a').css({ 'color': '#333333' }); } else { $('.site-title a').css({ 'color': to }); } }); }); wp.customize(prefix + 'header_tagline_color', function (value) { value.bind(function (to) { if (''=== to) { $('.site-tagline').css({ 'color': '#333333' }); } else { $('.site-tagline').css({ 'color': to }); } }); }); wp.customize(prefix + 'header_menu_item_color', function (value) { value.bind(function (to) { if (''=== to) { $('#header ul a').css({ 'color': '#111111' }); } else { $('#header ul').css({ 'color': to }); } }); }); wp.customize(prefix + 'header_menu_submenu_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('#header ul li > .sub-menu').css({ 'background': '#ffffff' }); } else { $('#header ul li > .sub-menu').css({ 'background': to }); } }); }); wp.customize(prefix + 'header_menu_current_item_border', function (value) { value.bind(function (to) { if (''=== to) { $('#header ul li.current-menu-item').css({ 'border-color': '#ffc80a' }); } else { $('#header ul li.current-menu-item').css({ 'border-color': to }); } }); }); wp.customize(prefix + 'header_menu_submenu_link_color', function (value) { value.bind(function (to) { if (''=== to) { $('#header ul li .sub-menu li a').css({ 'color': '#111111' }); } else { $('#header ul li .sub-menu li a').css({ 'color': to }); } }); }); wp.customize(prefix + 'header_txt_color', function (value) { value.bind(function (to) { if (''=== to) { $('.header-image-container .header-texts h2').css({ 'color': '#222222' }); } else { $('.header-image-container .header-texts h2').css({ 'color': to }); } }); }); wp.customize(prefix + 'header_button_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('.header-image-container .header-texts a').css({ 'background': '#333333' }); } else { $('.header-image-container .header-texts a').css({ 'background': to }); } }); }); wp.customize(prefix + 'header_button_txt_color', function (value) { value.bind(function (to) { if (''=== to) { $('.header-image-container .header-texts a').css({ 'color': '#fefefe' }); } else { $('.header-image-container .header-texts a').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_about_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('#home-about-section').css({ 'background': '#ffffff' }); } else { $('#home-about-section').css({ 'background': to }); } }); }); wp.customize(prefix + 'home_about_title_color', function (value) { value.bind(function (to) { if (''=== to) { $('#home-about-section h2.section-title').css({ 'color': '#50596C' }); } else { $('#home-about-section h2.section-title').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_about_subtitle_color', function (value) { value.bind(function (to) { if (''=== to) { $('#home-about-section h3.section-subtitle').css({ 'color': '#50596C' }); } else { $('#home-about-section h3.section-subtitle').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_about_txt_color', function (value) { value.bind(function (to) { if (''=== to) { $('.about-section-content').css({ 'color': '#50596C' }); } else { $('.about-section-content').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_services_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-services').css({ 'background': '#222222' }); } else { $('.home-services').css({ 'background': to }); } }); }); wp.customize(prefix + 'home_services_title_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-services h2.section-title').css({ 'color': '#f8f8f8' }); } else { $('.home-services h2.section-title').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_services_subtitle_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-services h3.section-subtitle').css({ 'color': '#f8f8f8' }); } else { $('.home-services h3.section-subtitle').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_services_icon_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-services .front-single-service .service-icon').css({ 'color': '#ffc80a' }); } else { $('.home-services .front-single-service .service-icon').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_projects_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-projects').css({ 'background': '#ffffff' }); } else { $('.home-projects').css({ 'background': to }); } }); }); wp.customize(prefix + 'home_projects_title_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-projects h2.section-title').css({ 'color': '#f8f8f8' }); } else { $('.home-projects h2.section-title').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_projects_subtitle_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-projects h3.section-subtitle').css({ 'color': '#f8f8f8' }); } else { $('.home-projects h3.section-subtitle').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_projects_prj_title_link_color', function (value) { value.bind(function (to) { if (''=== to) { $('.project-details a').css({ 'color': '#111111' }); } else { $('.project-details a').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_gallery_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-gallery').css({ 'background': '#222222' }); } else { $('.home-gallery').css({ 'background': to }); } }); }); wp.customize(prefix + 'home_gallery_title_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-gallery h2.section-title').css({ 'color': '#f8f8f8' }); } else { $('.home-gallery h2.section-title').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_gallery_subtitle_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-gallery h3.section-subtitle').css({ 'color': '#f8f8f8' }); } else { $('.home-gallery h3.section-subtitle').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_team_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-team').css({ 'background': '#f5f5f5' }); } else { $('.home-team').css({ 'background': to }); } }); }); wp.customize(prefix + 'home_team_title_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-team h2.section-title').css({ 'color': '#50596C' }); } else { $('.home-team h2.section-title').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_team_subtitle_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-team h3.section-subtitle').css({ 'color': '#50596C' }); } else { $('.home-team h3.section-subtitle').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_team_member_link_color', function (value) { value.bind(function (to) { if (''=== to) { $('.single-team-item a').css({ 'color': '#50596C' }); } else { $('.single-team-item a').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_team_job_title_color', function (value) { value.bind(function (to) { if (''=== to) { $('.single-team-item p').css({ 'color': '#adadad' }); } else { $('.single-team-item p').css({ 'color': to }); } }); }); // Testimonials wp.customize(prefix + 'home_testimonials_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-testimonials').css({ 'background': '#ffffff' }); } else { $('.home-testimonials').css({ 'background': to }); } }); }); wp.customize(prefix + 'home_testimonials_title_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-testimonials h2.section-title').css({ 'color': '#50596C' }); } else { $('.home-testimonials h2.section-title').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_testimonials_subtitle_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-testimonials h3.section-subtitle').css({ 'color': '#50596C' }); } else { $('.home-testimonials h3.section-subtitle').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_testimonials_single_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('.single-testimonial-item').css({ 'background': '#ffffff' }); } else { $('.single-testimonial-item').css({ 'background': to }); } }); }); wp.customize(prefix + 'home_testimonials_single_text_color', function (value) { value.bind(function (to) { if (''=== to) { $('.single-testimonial-item p').css({ 'color': '#50596c' }); } else { $('.single-testimonial-item p').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_testimonials_single_name_color', function (value) { value.bind(function (to) { if (''=== to) { $('.single-testimonial-item h4 a').css({ 'color': '#111111' }); } else { $('.single-testimonial-item h4 a').css({ 'color': to }); } }); }); // Latest Posts wp.customize(prefix + 'home_blog_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-blog').css({ 'background': '#f5f5f5' }); } else { $('.home-blog').css({ 'background': to }); } }); }); wp.customize(prefix + 'home_blog_title_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-blog h2.section-title').css({ 'color': '#50596C' }); } else { $('.home-blog h2.section-title').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_blog_subtitle_color', function (value) { value.bind(function (to) { if (''=== to) { $('.home-blog h3.section-subtitle').css({ 'color': '#50596C' }); } else { $('.home-blog h3.section-subtitle').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_blog_item_meta_color', function (value) { value.bind(function (to) { if (''=== to) { $('.single-blog-item .blog-item-contents .date').css({ 'color': '#c8c8c8' }); } else { $('.single-blog-item .blog-item-contents .date').css({ 'color': to }); } }); }); wp.customize(prefix + 'home_blog_item_title_color', function (value) { value.bind(function (to) { if (''=== to) { $('.single-blog-item h4').css({ 'color': '#50596C' }); } else { $('.single-blog-item h4').css({ 'color': to }); } }); }); wp.customize(prefix + 'single_postpage_major_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('.major-title').css({ 'background': '#f8f8f8' }); } else { $('.major-title').css({ 'background': to }); } }); }); wp.customize(prefix + 'single_postpage_major_txt_color', function (value) { value.bind(function (to) { if (''=== to) { $('.major-title').css({ 'color': '#50596C' }); } else { $('.major-title').css({ 'color': to }); } }); }); wp.customize(prefix + 'single_postpage_breadcrump_bg_color', function (value) { value.bind(function (to) { if (''=== to) { $('.atlast-breadcrumb').css({ 'background': '#fafafa' }); } else { $('.atlast-breadcrumb').css({ 'background': to }); } }); }); wp.customize(prefix + 'single_postpage_breadcrump_link_color', function (value) { value.bind(function (to) { if (''=== to) { $('.breadcrumb .breadcrumb-item:not(:last-child) a').css({ 'color': '#667189' }); } else { $('.breadcrumb .breadcrumb-item:not(:last-child) a').css({ 'color': to }); } }); }); wp.customize(prefix + 'single_postpage_breadcrump_txt_color', function (value) { value.bind(function (to) { if (''=== to) { $('.breadcrumb .breadcrumb-item').css({ 'color': '#667189' }); } else { $('.breadcrumb .breadcrumb-item').css({ 'color': to }); } }); }); wp.customize(prefix + 'single_postpage_headings_color', function (value) { value.bind(function (to) { if (''=== to) { $('article h1, article h2,article h3 , article h4, article h5, article h6').css({ 'color': '#50596c' }); } else { $('article h1, article h2,article h3 , article h4, article h5, article h6').css({ 'color': to }); } }); }); wp.customize(prefix + 'single_postpage_body_color', function (value) { value.bind(function (to) { if (''=== to) { $('article p').css({ 'color': '#50596c' }); } else { $('article p').css({ 'color': to }); } }); }); wp.customize(prefix + 'single_postpage_link_color', function (value) { value.bind(function (to) { if (''=== to) { $('article a').css({ 'color': '#111111' }); } else { $('article a').css({ 'color': to }); } }); }); //Buttons wp.customize(prefix + 'button_txt_color', function (value) { value.bind(function (to) { if (''=== to) { $('.comment-reply-link, .pagination-link, .read-more-link').css({ 'color': '#333333' }); } else { $('.comment-reply-link, .pagination-link, .read-more-link').css({ 'color': to }); } }); }); wp.customize(prefix + 'button_bg_color', function (value) { value.bind(function (to) { if ('' === to) { $('.comment-reply-link, .pagination-link, .read-more-link').css({ 'background': '#ffffff' }); } else { $('.comment-reply-link, .pagination-link, .read-more-link').css({ 'background': to }); } }); }); wp.customize(prefix + 'button_border_color', function (value) { value.bind(function (to) { if ('' === to) { $('.comment-reply-link, .pagination-link, .read-more-link').css({ 'border-color': '#50596C' }); } else { $('.comment-reply-link, .pagination-link, .read-more-link').css({ 'border-color': to }); } }); }); wp.customize(prefix + 'widget_title_color', function (value) { value.bind(function (to) { if ('' === to) { $('.widget-area h3').css({ 'color': '#50596c' }); } else { $('.widget-area h3').css({ 'color': to }); } }); }); wp.customize(prefix + 'widget_txt_color', function (value) { value.bind(function (to) { if ('' === to) { $('.widget p , .widget:not(a)').css({ 'color': '#50596c' }); } else { $('.widget p ,.widget:not(a)').css({ 'color': to }); } }); }); wp.customize(prefix + 'widget_link_color', function (value) { value.bind(function (to) { if ('' === to) { $('.widget-container ul li a').css({ 'color': '#111111' }); } else { $('.widget-container ul li a').css({ 'color': to }); } }); }); wp.customize(prefix + 'footer_area_bg_color', function (value) { value.bind(function (to) { if ('' === to) { $('.footer-area').css({ 'background': '#fbfbfb' }); } else { $('.footer-area').css({ 'background': to }); } }); }); wp.customize(prefix + 'footer_widget_title_color', function (value) { value.bind(function (to) { if ('' === to) { $('.footer-widget-title').css({ 'color': '#333333' }); } else { $('.footer-widget-title').css({ 'color': to }); } }); }); wp.customize(prefix + 'footer_widget_txt_color', function (value) { value.bind(function (to) { if ('' === to) { $('.footer-widget p').css({ 'color': '#333333' }); } else { $('.footer-widget p').css({ 'color': to }); } }); }); wp.customize(prefix + 'footer_widget_link_color', function (value) { value.bind(function (to) { if ('' === to) { $('.footer-widget ul li a').css({ 'color': '#111111' }); } else { $('.footer-widget ul li a').css({ 'color': to }); } }); }); wp.customize(prefix + 'copyright_bg_color', function (value) { value.bind(function (to) { if ('' === to) { $('#copyright').css({ 'background': '#333333' }); } else { $('#copyright').css({ 'background': to }); } }); }); wp.customize(prefix + 'copyright_txt_color', function (value) { value.bind(function (to) { if ('' === to) { $('#copyright').css({ 'color': '#e8e8e8' }); } else { $('#copyright').css({ 'color': to }); } }); }); wp.customize(prefix + 'copyright_link_color', function (value) { value.bind(function (to) { if ('' === to) { $('#copyright a').css({ 'color': '#ffc80a' }); } else { $('#copyright a').css({ 'color': to }); } }); }); });