/* < theme-customizer > Copyright (C) <2014> < themeshock http://www.themeshock.com/ > This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ ( function( $ ){ /*Body area*/ wp.customize( 'BillyDroid_theme_options[body_fontfamily]', function( value ) { value.bind( function( newval ) { $('#body_theme').css('font-family',newval); } ); } ) wp.customize( 'BillyDroid_theme_options[body_fontsize]', function( value ) { value.bind( function( newval ) { $('#body_theme').css('font-size',newval); } ); } ) wp.customize( 'BillyDroid_theme_options[body_color]', function( value ) { value.bind( function( newval ) { $('#body_theme').css('color',newval); } ); } ) /*Heading area*/ wp.customize( 'BillyDroid_theme_options[Headings_fontfamily]', function( value ) { value.bind( function( newval ) { $( 'body .body_theme h1, body .body_theme h2, body .body_theme h3, body .body_theme h4, body .body_theme h5, body .body_theme h6' ).css( 'font-family',newval); } ); } ) $.each( _.range( 1,6 ), function( i, h) { /* iterate through array or object */ var heading_ftz ='H'+h+'_fontsize', heading_col = 'H'+h+'_color', target_heading ='body .body_theme h'+h ; wp.customize( 'BillyDroid_theme_options['+heading_ftz+']', function( value ) { value.bind( function( newval ) { $( target_heading ).css('font-size',newval+'px'); } ); } ) wp.customize( 'BillyDroid_theme_options['+heading_col+']', function( value ) { value.bind( function( newval ) { $( target_heading ).css('color',newval); } ); } ) }); /*global settings*/ wp.customize( 'BillyDroid_theme_options[menu_show]', function( value ) { value.bind( function( newval ) { $('body .container_menu').attr("data-show",newval); $('body .navbar').attr("data-show",newval); } ); } ) wp.customize( 'BillyDroid_theme_options[topbar_show]', function( value ) { value.bind( function( newval ) { $('body .header_menu_bar').attr("data-show",newval); } ); } ) wp.customize( 'BillyDroid_theme_options[search_show]', function( value ) { value.bind( function( newval ) { $('body #header .search_area').attr("data-show",newval); } ); } ) /*iconposts settings */ wp.customize( 'BillyDroid_theme_options[iconpost_author]', function( value ) { value.bind( function( newval ) { $('body .post_author').attr("data-show",newval); } ); } ) wp.customize( 'BillyDroid_theme_options[iconpost_date]', function( value ) { value.bind( function( newval ) { $('body .post_date').attr("data-show",newval); } ); } ) wp.customize( 'BillyDroid_theme_options[iconpost_category]', function( value ) { value.bind( function( newval ) { $('body .post_categ').attr("data-show",newval); } ); } ) wp.customize( 'BillyDroid_theme_options[iconpost_tags]', function( value ) { value.bind( function( newval ) { $('body .post_tag').attr("data-show",newval); } ); } ) wp.customize( 'BillyDroid_theme_options[iconpost_comments]', function( value ) { value.bind( function( newval ) { $('body .post_commts').attr("data-show",newval); } ); } ) wp.customize( 'BillyDroid_theme_options[iconpost_comments2]', function( value ) { value.bind( function( newval ) { $('body .comments_link').attr("data-show",newval); } ); } ) /*Dislay option seettings*/ wp.customize( 'BillyDroid_theme_options[post_display]', function( value ) { value.bind( function( newval ) { $('body .content_posts').attr("data-display",newval); } ); } ) wp.customize( 'BillyDroid_theme_options[post_size]', function( value ) { value.bind( function( newval ) { $('body .content_posts').attr("data-postsize",newval); } ); } ) wp.customize( 'BillyDroid_theme_options[post_style]', function( value ) { value.bind( function( newval ) { switch(newval){ case 'boxcss_default': $('body .wrapper_content').removeAttr("data-poststyle") break; default: $('body .wrapper_content').attr("data-poststyle",newval); break; } } ); } ) /*Logo area*/ wp.customize( 'BillyDroid_theme_options[logo_mode]', function( value ) { value.bind( function( newval ) { $('body .logo').attr("data-mode",newval); } ); } ) wp.customize( 'BillyDroid_theme_options[logo_text]', function( value ) { value.bind( function( newval ) { $('body .logo p').text(newval); } ); } ) wp.customize( 'BillyDroid_theme_options[logo_effect]', function( value ) { value.bind( function( newval ) { $('body .logo').attr("data-effect",newval); } ); } ) wp.customize( 'BillyDroid_theme_options[logo_fontfamily]', function( value ) { value.bind( function( newval ) { $('body .logo').css('font-family',newval); } ); } ) wp.customize( 'BillyDroid_theme_options[logo_fontsize]', function( value ) { value.bind( function( newval ) { $('body .logo').css('font-size',newval); } ); } ) wp.customize( 'BillyDroid_theme_options[logo_footer]', function( value ) { value.bind( function( newval ) { if (newval===true){ $('body #footer .logo').show(); }else{ $('body #footer .logo').hide(); } } ); } ) wp.customize( 'BillyDroid_theme_options[logo_img]', function( value ) { value.bind( function( newval ) { $('body .logo img').attr('src',newval); } ); } ) /* footer area */ wp.customize( 'BillyDroid_theme_options[footer_info]', function( value ) { value.bind( function( newval ) { $('div.footer_info p').html( newval ); } ); } ) } )( jQuery );