So I have a script like this inside my html:
<script>
var slider = new Slider("#pics", {
tooltip: 'always'
});
</script>
I was to put this script inside a JavaScript file, so am assuming I am going to turn it into a function
Like this:
function change_pics(){
var slider = new Slider("#pics", {
tooltip: 'always'
});
}
is this correct way ?