I have this script:
$(document).ready(function(){
$("text1").click(function(){
$(this).hide();
});
});
Code html:
<div class="div1">
<p class="text1">text to appear when the user puts the mouse over</p>
</div>
I want to apply this script to my website in Wordpress.
I put this code in functions.php
add_action( 'wp_enqueue_scripts', 'script_echipa' );
function script_echipa()
{ wp_enqueue_script( 'script', get_template_directory_uri() . '/js/echipa.js', array('jquery'), null, true );
}
It is a very simple script that works smoothly on local Wordpress but we did not implement it.
Is something wrong?
Can you help me to solve this problem?
Thanks in advance!