I have two different scripts that do different things but I do not want them to run at the same time as one script displays the video in black and white and another script lets the user add text on the video.
<script type="text/javascript" src="<?php echo base_url();?>application/scripts/canvas.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>application/scripts/filter.js"></script>
I have made a 3rd script which will be used to chose the script depending on the button clicked and so far this is what I have below but nothing happens when I click on the button, Is the script loaded in the correct way when the blk button is clicked?
    var buttonClickedId = buttonElement.id;
    if( buttonClickedId === 'blk' ){
       // do btn1 stuff
       <script type="text/javascript" src="<?php echo base_url();?>application/scripts/filter.js"></script>
    }
    else if( buttonClickedId === 'btn2' ){
       // do btn2 stuff
       <script type="text/javascript" src="<?php echo base_url();?>application/scripts/canvas.js"></script>
    } 
    else{
       <script type="text/javascript" src="<?php echo base_url();?>application/scripts/filter.js"></script>
    }
  
  } 
 
    