You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<script type="text/javascript">
jQuery(document).ready(function($){
var parallaxSettings = {
initialOpacity: 1, //from 0 to 1, e.g. 0.34 is a valid value. 0 = transparent, 1 = Opaque
opacitySpeed: 0.1, //values from 0.01 to 1 -> 0.01: slowly appears on screen; 1: appears as soon as the user scrolls 1px
pageLoader: true
};
parallaxImgScroll(parallaxSettings);
});
</script>
I still have this error
Uncaught ReferenceError: parallaxImgScroll is not defined
at HTMLDocument.<anonymous> ((index):55)
at j (jquery.js?ver=1.11.3:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.11.3:2)
at Function.ready (jquery.js?ver=1.11.3:2)
at HTMLDocument.J (jquery.js?ver=1.11.3:2)
The text was updated successfully, but these errors were encountered:
Is there a reason you are placing the initialization script within the header.php instead of using WP best practicing and enqueuing it? This is the proper way:
Create a "parallaximg-init.js" file and place the following code in it:
jQuery(document).ready(function($){
var parallaxSettings = {
initialOpacity: 1, //from 0 to 1, e.g. 0.34 is a valid value. 0 = transparent, 1 = Opaque
opacitySpeed: 0.1, //values from 0.01 to 1 -> 0.01: slowly appears on screen; 1: appears as soon as the user scrolls 1px
pageLoader: true
};
parallaxImgScroll(parallaxSettings);
});
I am trying to use your plug-in on wordpress.
1)I have enqued the script such as :
wp_enqueue_script( 'parallaximg', get_template_directory_uri() . '/js/parallaxImg.js', array('jquery'), true);
to avoid conflict with jquery i have embed parallaxImg.js into
jQuery(document).ready(function($){});
2)I added this to my index.php
3)I add those line in header.php
I still have this error
The text was updated successfully, but these errors were encountered: