Hi Armin, hi Marius.
I'm experimenting an issue with a thing I wanted to put into my website.
This is my problem: I'm trying to put this JS code in order to change a word randomly with a series of other words.
This is the code I put into the "head" section.
<script type="text/javascript">
// Array of words
var words = ['*', 'web' , 'graphic' , 'visual' , 'digital' , 'icon' , 'logo' , 'UI' , 'UX' , 'editorial' , 'infographic' , '(basic) illustration' , '(basic) video' , 'type' ];
// Function that executes every 2000 milliseconds
var t = setInterval(function() {
// Random number generator
var randomNumber = Math.round( Math.random() * (words.length-1) );
// Change the word in the span for a random one in the array of words
$('#changing').html( words[ randomNumber ] );
}, 2000);
</script>
Unfortunately, if I put only this code it doesnt' work,
So I tried to add this thing because I supposed the function needed Jquery:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
And eventually the trick worked, but after that implementation I saw that the "scroll to top" feature doesn't work anymore.
So, what can I do if I want to keep both things full working but at the same time avoiding that kind of conflicts?
Thanks a lot.
Jacopo