Hello,
I need to load css and javascript files.
In the folder child I have function.php file, with the following code:
function ponerEnColaCargaFicheros() {
wp_enqueue_style( 'jshowoff', '
http://fabricanet.com/clientes/cd/wp-content/rafa/jshowoff.css');
wp_enqueue_script( 'jquery.min', '
http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js', array(), '1.0.0', true );
wp_enqueue_script( 'jquery.jshowoff.min', '
http://fabricanet.com/clientes/cd/wp-content/rafa/jquery.jshowoff.min.js', array(), '1.0.0', true );
wp_enqueue_script( 'servicio', '
http://fabricanet.com/clientes/cd/wp-content/rafa/servicio.js', array(), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'ponerEnColaCargaFicheros' );
But do not load the page, all the time remaining in the preload.
As I can do to load these files using the child theme?
thank your
Rafa
Comments
You have few JavaScript errors visible in the console:
1.
TypeError: $ is not a function
http://www.fabricanet.com/clientes/cd/
Line 386
$(document).ready(function(){ $('#slidingFeatures').jshowoff({
2.
TypeError: $ is not a function
http://www.fabricanet.com/clientes/cd/
Line 434
$(document).ready(function(){ $('#servicioFeatures').jshowoff({
Those are preventin page form complete load.
Is it something You wrote? This can be a custom JS code inside Revolution Slider.
All the Best.
these codes work well:
$ (document) .ready (function () {$ ('# slidingFeatures'). jshowoff ({
$ (document) .ready (function () {$ ('# servicioFeatures'). jshowoff ({
If I hit load files directly in header.php it works perfectly.
Why to load them from the child theme does not work?
thanks
I would have to have an opportunity to look at the code You've made. Otherwise I just can't give You procise answer.
All the Best.