jQuery(document).ready(function($) { var imagepath = 'https://www.coothemes.com/wp-content/themes/acool/images/'; $("#ct_select_section_temp_0").on("change", function(){ var selected = $(this).val(); var getarr = get_section_arr(selected); document.getElementById("section_title_color_0").value=getarr["section_title_color"];//Title Color document.getElementById("section_content_color_0").value=getarr["section_content_color"];//Content Color document.getElementById("section_background_0_color").value=getarr["section_background_color"]; document.getElementById("section_background_0").value=getarr["section_background"];//Section Background document.getElementById("background_size_0").value=getarr["background_size"];//100% Width Background Image document.getElementById("full_width_0").value=getarr["full_width"];//Full Width document.getElementById("section_css_class_0").value=getarr["section_css_class"];//Section Css Class document.getElementById("section_content_0").value=getarr["section_content"];//Section Content }) $("#ct_select_section_temp_1").on("change", function(){ var selected = $(this).val(); var getarr = get_section_arr(selected); document.getElementById("section_title_color_1").value=getarr["section_title_color"];//Title Color document.getElementById("section_content_color_1").value=getarr["section_content_color"];//Content Color document.getElementById("section_background_1_color").value=getarr["section_background_color"]; document.getElementById("section_background_1").value=getarr["section_background"];//Section Background document.getElementById("background_size_1").value=getarr["background_size"];//100% Width Background Image document.getElementById("full_width_1").value=getarr["full_width"];//Full Width document.getElementById("section_css_class_1").value=getarr["section_css_class"];//Section Css Class document.getElementById("section_content_1").value=getarr["section_content"];//Section Content }) $("#ct_select_section_temp_2").on("change", function(){ var selected = $(this).val(); var getarr = get_section_arr(selected); document.getElementById("section_title_color_2").value=getarr["section_title_color"];//Title Color document.getElementById("section_content_color_2").value=getarr["section_content_color"];//Content Color document.getElementById("section_background_2_color").value=getarr["section_background_color"]; document.getElementById("section_background_2").value=getarr["section_background"];//Section Background document.getElementById("background_size_2").value=getarr["background_size"];//100% Width Background Image document.getElementById("full_width_2").value=getarr["full_width"];//Full Width document.getElementById("section_css_class_2").value=getarr["section_css_class"];//Section Css Class document.getElementById("section_content_2").value=getarr["section_content"];//Section Content }) $("#ct_select_section_temp_3").on("change", function(){ var selected = $(this).val(); var getarr = get_section_arr(selected); document.getElementById("section_title_color_3").value=getarr["section_title_color"];//Title Color document.getElementById("section_content_color_3").value=getarr["section_content_color"];//Content Color document.getElementById("section_background_3_color").value=getarr["section_background_color"]; document.getElementById("section_background_3").value=getarr["section_background"];//Section Background document.getElementById("background_size_3").value=getarr["background_size"];//100% Width Background Image document.getElementById("full_width_3").value=getarr["full_width"];//Full Width document.getElementById("section_css_class_3").value=getarr["section_css_class"];//Section Css Class document.getElementById("section_content_3").value=getarr["section_content"];//Section Content }) $("#ct_select_section_temp_4").on("change", function(){ var selected = $(this).val(); var getarr = get_section_arr(selected); document.getElementById("section_title_color_4").value=getarr["section_title_color"];//Title Color document.getElementById("section_content_color_4").value=getarr["section_content_color"];//Content Color document.getElementById("section_background_4_color").value=getarr["section_background_color"]; document.getElementById("section_background_4").value=getarr["section_background"];//Section Background document.getElementById("background_size_4").value=getarr["background_size"];//100% Width Background Image document.getElementById("full_width_4").value=getarr["full_width"];//Full Width document.getElementById("section_css_class_4").value=getarr["section_css_class"];//Section Css Class document.getElementById("section_content_4").value=getarr["section_content"];//Section Content }) $("#ct_select_section_temp_5").on("change", function(){ var selected = $(this).val(); var getarr = get_section_arr(selected); document.getElementById("section_title_color_5").value=getarr["section_title_color"];//Title Color document.getElementById("section_content_color_5").value=getarr["section_content_color"];//Content Color document.getElementById("section_background_5_color").value=getarr["section_background_color"]; document.getElementById("section_background_5").value=getarr["section_background"];//Section Background document.getElementById("background_size_5").value=getarr["background_size"];//100% Width Background Image document.getElementById("full_width_5").value=getarr["full_width"];//Full Width document.getElementById("section_css_class_5").value=getarr["section_css_class"];//Section Css Class document.getElementById("section_content_5").value=getarr["section_content"];//Section Content }) $("#ct_select_section_temp_6").on("change", function(){ var selected = $(this).val(); var getarr = get_section_arr(selected); document.getElementById("section_title_color_6").value=getarr["section_title_color"];//Title Color document.getElementById("section_content_color_6").value=getarr["section_content_color"];//Content Color document.getElementById("section_background_6_color").value=getarr["section_background_color"]; document.getElementById("section_background_6").value=getarr["section_background"];//Section Background document.getElementById("background_size_6").value=getarr["background_size"];//100% Width Background Image document.getElementById("full_width_6").value=getarr["full_width"];//Full Width document.getElementById("section_css_class_6").value=getarr["section_css_class"];//Section Css Class document.getElementById("section_content_6").value=getarr["section_content"];//Section Content }) $("#ct_select_section_temp_7").on("change", function(){ var selected = $(this).val(); var getarr = get_section_arr(selected); document.getElementById("section_title_color_7").value=getarr["section_title_color"];//Title Color document.getElementById("section_content_color_7").value=getarr["section_content_color"];//Content Color document.getElementById("section_background_7_color").value=getarr["section_background_color"]; document.getElementById("section_background_7").value=getarr["section_background"];//Section Background document.getElementById("background_size_7").value=getarr["background_size"];//100% Width Background Image document.getElementById("full_width_7").value=getarr["full_width"];//Full Width document.getElementById("section_css_class_7").value=getarr["section_css_class"];//Section Css Class document.getElementById("section_content_7").value=getarr["section_content"];//Section Content }) $("#ct_select_section_temp_8").on("change", function(){ var selected = $(this).val(); var getarr = get_section_arr(selected); document.getElementById("section_title_color_8").value=getarr["section_title_color"];//Title Color document.getElementById("section_content_color_8").value=getarr["section_content_color"];//Content Color document.getElementById("section_background_8_color").value=getarr["section_background_color"]; document.getElementById("section_background_8").value=getarr["section_background"];//Section Background document.getElementById("background_size_8").value=getarr["background_size"];//100% Width Background Image document.getElementById("full_width_8").value=getarr["full_width"];//Full Width document.getElementById("section_css_class_8").value=getarr["section_css_class"];//Section Css Class document.getElementById("section_content_8").value=getarr["section_content"];//Section Content }) $("#ct_select_section_temp_9").on("change", function(){ var selected = $(this).val(); var getarr = get_section_arr(selected); document.getElementById("section_title_color_9").value=getarr["section_title_color"];//Title Color document.getElementById("section_content_color_9").value=getarr["section_content_color"];//Content Color document.getElementById("section_background_9_color").value=getarr["section_background_color"]; document.getElementById("section_background_9").value=getarr["section_background"];//Section Background document.getElementById("background_size_9").value=getarr["background_size"];//100% Width Background Image document.getElementById("full_width_9").value=getarr["full_width"];//Full Width document.getElementById("section_css_class_9").value=getarr["section_css_class"];//Section Css Class document.getElementById("section_content_9").value=getarr["section_content"];//Section Content }) function get_section_arr(str) { str = str.replace(/^(\s|\u00A0)+/,'').replace(/(\s|\u00A0)+$/,''); var arr=new Object(); switch (str) { case "video": // ... arr['section_title']='video';//Section Title arr["section_title_color"]='';//Title Color arr["section_content_color"]='#ffffff';//Content Color arr["section_background_color"]= ''; arr["section_background"]=imagepath+'default-bg-section.png';//Section Background arr["background_size"]='yes';//100% Width Background Image arr["full_width"]='yes';//Full Width arr["section_css_class"]='';//Section Css Class arr["section_content"]= '

Anna
\n '+ 'Support
\n '+ '\n '+ ' \n '+ ' \n '+ ' \n '+ '
\n '+ 'consectetur adipisicing elit Lorem ipsum dolor sit amet, consectetur adipisicing elit.
\n '+ '
Brown
\n '+ 'Designer
\n '+ '\n '+ ' \n '+ ' \n '+ ' \n '+ '
\n '+ 'consectetur adipisicing elit Lorem ipsum dolor sit amet, consectetur adipisicing elit.
\n '+ 'Employees
\n '+ 'Projects
\n '+ 'Dogs
\n '+ 'Offices
\n '+ 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
\n '+ ' \n '+ '$10/month
$20/month
$30/month
$40/month