Support » Plugin: jBreadCrumb Aink » This fixes the JavaScript loader and let's the JavaScript load at the bottom

  • Plugin Author a4jp

    (@a4jpcom)


    This fixes the Javascript loader and let’s the JavaScript load at the bottom of the page. It also let’s other plugins disable the code on pages it is not needed on. I just commented out the old code so you can still see it.

    //function jBreadCrumbAink_head()
    //{
    //	global $jBreadCrumbAink_path;
    //
    //	echo '<!-- jBreadCrumb Aink -->
    //
    //		<link type="text/css" rel="stylesheet" href="'.$jBreadCrumbAink_path.'/css/jbreadcrumb-aink.css"/>
    //
    //		<script type="text/javascript" language="JavaScript" src="'.$jBreadCrumbAink_path.'/js/jquery.easing.js"></script>
    //		<script type="text/javascript" language="JavaScript" src="'.$jBreadCrumbAink_path.'/js/jquery.jBreadCrumb.js"></script>
    //		<script type="text/javascript" language="JavaScript">
    //			jQuery(document).ready(function() {
    //				jQuery("#jBreadCrumbAink").jBreadCrumb();
    //			})
    //		</script>';
    //
    //	echo '<!-- jBreadCrumb Aink -->';
    //}
    
    function themeslug_enqueue_style() {
    	wp_enqueue_style( 'core', '/wp-content/plugins/jbreadcrumb-aink/css/jbreadcrumb-aink.css', false );
    }
    add_action( 'wp_enqueue_scripts', 'themeslug_enqueue_style' );
    
    function themeslug_enqueue_script() {
    	wp_enqueue_script( 'my-js1', '/wp-content/plugins/jbreadcrumb-aink/js/jquery.easing.js','','',true);
    	wp_enqueue_script( 'my-js2', '/wp-content/plugins/jbreadcrumb-aink/js/jquery.jBreadCrumb.js','','',true);
    }
    
    add_action( 'wp_enqueue_scripts', 'themeslug_enqueue_script' );

    https://wordpress.org/plugins/jbreadcrumb-aink/

Viewing 1 replies (of 1 total)
  • Plugin Author a4jp

    (@a4jpcom)

    This code is a bit better for finding the code name in WP Remove Css-Js:

    //function jBreadCrumbAink_head()
    //{
    //	global $jBreadCrumbAink_path;
    //
    //	echo '<!-- jBreadCrumb Aink -->
    //
    //		<link type="text/css" rel="stylesheet" href="'.$jBreadCrumbAink_path.'/css/jbreadcrumb-aink.css"/>
    //
    //		<script type="text/javascript" language="JavaScript" src="'.$jBreadCrumbAink_path.'/js/jquery.easing.js"></script>
    //		<script type="text/javascript" language="JavaScript" src="'.$jBreadCrumbAink_path.'/js/jquery.jBreadCrumb.js"></script>
    //		<script type="text/javascript" language="JavaScript">
    //			jQuery(document).ready(function() {
    //				jQuery("#jBreadCrumbAink").jBreadCrumb();
    //			})
    //		</script>';
    //
    //	echo '<!-- jBreadCrumb Aink -->';
    //}
    
    function themeslug_enqueue_style() {
    	wp_enqueue_style( 'jbreadcrumbs-aink-css', '/wp-content/plugins/jbreadcrumb-aink/css/jbreadcrumb-aink.css', false );
    }
    add_action( 'wp_enqueue_scripts', 'themeslug_enqueue_style' );
    
    function themeslug_enqueue_script() {
    	wp_enqueue_script( 'jbreadcrumbs-aink-easing-js', '/wp-content/plugins/jbreadcrumb-aink/js/jquery.easing.js','','',true);
    	wp_enqueue_script( 'jbreadcrumbs-aink-jbreadcrumb-js', '/wp-content/plugins/jbreadcrumb-aink/js/jquery.jBreadCrumb.js','','',true);
    }
    
    add_action( 'wp_enqueue_scripts', 'themeslug_enqueue_script' );
Viewing 1 replies (of 1 total)
  • The topic ‘This fixes the JavaScript loader and let's the JavaScript load at the bottom’ is closed to new replies.