title: How to copy a piece of css, html and js from one static template to another?
body: <p>I have a folder of static files (html, css and js) and I recognised a piece of code (say, a dinosaur animation) that I want to transport to another folder of static files (a separate project of my own based on a different template).</p>
  
  <p>The main question is what is the correct and efficient way to do this. This is my current process:</p>
  
  <ol>
  <li>Manually recognise the minimal
  
  <ul>
  <li><strong>html</strong> chunk where this piece is displayed (<strong><em>div class="dinosaur_animation" ...</em></strong>)</li>
  <li><strong>css</strong> part where the classes are declared (<strong><em>.dinosaur_animation { ...</em></strong>)</li>
  <li><strong>js</strong> scripts needed</li>
  </ul></li>
  <li>Manually copy these pieces to the html, css and js sources of my new project.</li>
  <li>Rename the original class and function names (all instances of <strong><em>"dinosaur_animation"</em></strong> renamed to <strong><em>"dinosaur_animation_newproj"</em></strong>) as is frequently the case that there is conflict with classes and functions using the same name in the new project.</li>
  </ol>
  
  <p>I have successfully transported the pieces from one template to another using this process a couple time, but I am aware that it is extremely inefficient and there should be a smarter way of doing this. For lack of terminology knowledge, I also couldn't google properly.</p>
  
  <p>Could you kindly give a step by step of a smarter way of doing this? </p>
  
  <p>As extra points, can you help me to express what I have just described using correct terminology and antecipate if I can do the same if I am using Wordpress rather than handling static files directly? As everything seems to be wrapped into php and changing original files is regarded as a bad idea, I presume the answer is no... </p>
  
  <p>Thanks!</p>