I'm trying to generate a file within a bash script using EOF. The file is being generated correctly but, a piece of javascript code where I define a variable is being left out and malforming the code:
Javascript/Bash Code Snippet
cat << EOF > map.php
$( "#slider" ).slider({
  value:60,
min: 1.0,
max: 100.0,
  animate: true,
animate: 500,
slide: function( event, ui ) {
   historicalOverlay.setOpacity( ui.value/100 );
     }
});
EOF
Result
.slider({
  value:60,
min: 1.0,
max: 100.0,
  animate: true,
animate: 500,
slide: function( event, ui ) {
   historicalOverlay.setOpacity( ui.value/100 );
     }
});
 
    