Hey Armin, I am working on a new website with your theme. I have a problem which is very weird, but maybe you could help ( my working on mamp, but manage to put the website online very soon is you have no idea of the problem). I am trying to integrated a script, this script is working ONLY BACK_END and not FRONT_END -_- !
Here are the step :
1 ) Add script in ** functions.php** on the theme
wp_enqueue_script( 'tween-vendor-jquery', get_template_directory_uri() . '/custom/tween/js/vendor/jquery-1.9.1.min.js', array ( 'jquery' ), 1.1, true);
wp_enqueue_script( 'tween-vendor-tween', get_template_directory_uri() . '/custom/tween/js/vendor/TweenMax.min.js', array ( 'jquery' ), 1.1, true);
wp_enqueue_script( 'example', get_template_directory_uri() . '/custom/tween/js/example.js', array ( 'jquery' ), 1.1, true);
wp_enqueue_script( ‘SplitTextPlugin', get_template_directory_uri() . '/custom/tween/js/SplitTextPlugin.js', array ( 'jquery' ), 1.1, true);
2 ) Added var $ =jQuery.noConflict(); to make the $ work without conflict, here is my main script that should make the works scramble and move when the mouse move though body.
var $ =jQuery.noConflict();
$(document).ready(function(){
var scramble = $("#scramble").splitText({
'type':'words',
'animation':'scramble'
});
$("body").on('mouseover',function(){
scramble.animate(); });
});
-
I add the html code into « code source» of a text block
<div><p id="scramble" class="splitText">THIS IS A BORING TEXT SCRAMBLE IT!</p></div>
IT WORKS in the preview but when i update and check front-end NOTHING MOVE.
**I have try to add the html code directly in header.php and it work front-end, i have try to add it as a « html code » ( click on « more » and « html ») but do not work. **