I would like to add a snippet of code to my site to display a cool security camera that follows the mouse.
The code snippet is found on this page, but who do I go about adding it to my homepage?
http://codepen.io/moklick/pen/norzy
I’m not sure where to put the .js file, and how or where to add the css code and then how do I add the html code to my homepage to show it (the html part would be through a plain text block in the advanced editor when editing my homepage, right?)
Hi Alex!
You can insert the css code into the quick css field (Enfold > Styling). I recommend to place the js code into enfold/js/avia.js – insert it at the very bottom of the file. I’m not sure about the html code – probably the best solution would be to insert it in header.php – replace
<div id='main'>
with
<div id='main'>
<?php
if(is_home() || is_front_page()){
echo '<canvas id="canvas"></canvas>';
echo '<div class="info">move your mouse<div>';
}
Best regards,
Peter