function cp_reposition_widgets() { if ( jQuery(window).width() > 800 ) { jQuery('.content_left #welcome_widget').prependTo('.content_right'); jQuery('.content_left #refine_widget').prependTo('.content_right'); } else { jQuery('.content_right #welcome_widget').prependTo('.content_left'); jQuery('.content_right #refine_widget').prependTo('.content_left'); } }
if ( !function_exists('cp_load_scripts') ) : function cp_load_scripts() { global $cp_options; wp_enqueue_script( 'custom-theme-scripts', get_stylesheet_directory_uri() . '/includes/js/theme-scripts.js', array( 'jquery' ), '3.3.3' ); } endif; add_action( 'wp_enqueue_scripts', 'cp_load_scripts' );
if ( !function_exists('cp_load_scripts') ) : function cp_load_scripts_custom() { global $cp_options; wp_enqueue_script( 'custom-theme-scripts', get_stylesheet_directory_uri() . '/includes/js/theme-scripts.js', array( 'jquery' ), '3.3.3' ); } endif; add_action( 'wp_enqueue_scripts', 'cp_load_scripts_custom' );
jQuery(window).bind( "resize", cp_reposition_widgets_custom ); function cp_reposition_widgets_custom() { if ( jQuery(window).width() > 800 ) { jQuery('.content_left #welcome_widget').prependTo('.content_right'); jQuery('.content_left #refine_widget').prependTo('.content_right'); } else { jQuery('.content_right #welcome_widget').prependTo('.content_left'); jQuery('.content_right #refine_widget').prependTo('.content_right'); } }
There are currently 1 users browsing this thread. (0 members and 1 guests)