-
AuthorPosts
-
April 19, 2019 at 5:30 pm #1092715
Hello,
Thank you for past help with Enfold – I have been using/buying Enfold for about 5 years. I build everything in Enfold, the platform has come a long way, even though it was already way ahead of all others. So, thank you!Okay, now my question –
I want to embed a particular .js effect from something I found on GitHub. It is basically a couple of .js files, a custom CSS file, and an example .html. I want the example .html page to show in a section within a page on my enfold site. I can’t seem to make it work… I am not a newbie, as I have HEAVILY customized over two dozen Enfold sites. I have figured out a LOT through the forums, and by trial and error. I am STUCK!
I have included the GitHub effect and login details for my site in private. Please keep these parts private (private parts, lol) because of competitors.
Thank you so much in advance!
- This topic was modified 5 years, 7 months ago by jellyfish007.
April 22, 2019 at 9:24 pm #1093408Please help – if anyone is available. I really appreciate it! Also, please let me know if my question was too vague, or mis-stated. Thank you!
April 23, 2019 at 2:08 am #1093463Hi,
Thank you for using Enfold.
This thread should help you implement that script.
// https://kriesi.at/support/topic/trying-to-add-js-particles-background-via-enfold-theme/
If you want it in a color section, just follow this short guide.
Best regards,
IsmaelApril 23, 2019 at 2:16 pm #1093668Ismael, thank you for your long-time contributions and support to the Enfold community – I actually already read over this post you refer to; I have (in the past) implemented particle.js in a Enfold site. This current file/script I am working on is different. Would you please take a look a the file I sent in private before and confirm this? I also gave login credentials to my site. I would greatly appreciate your assistance.
Thank you again for everything you do and continue to do!
Sincerely
April 24, 2019 at 5:25 am #1093833Would you please offer additional instruction and/or assistance? I would greatly appreciate it, Ismael
April 24, 2019 at 3:12 pm #1094007Hi,
Sorry about that. I misread “particular” as “particle”, so I assumed you’re referring to that old “particle.js” script. We’ll give you an update once we learn more about that script.
Best regards,
IsmaelApril 24, 2019 at 3:21 pm #1094012Hi,
UPDATE: You need to load the following js files.
<script src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.1.2/zepto.min.js"></script> <script>window.Zepto || document.write('<script src="scripts/vendor/zepto.min.js"><\/script>')</script> <script src="scripts/wtf.js"></script> <script src="scripts/main.js"></script>
Copy the css code in the child theme’s style.css file or the Quick CSS Field. And then make sure that the following markup exists in the page.
<article> <div id="output"> <noscript> <dl> <dt>What the fuck! You don't even have JavaScript enabled!</dt> <dd>You need to enable it to see all the fucking cool shit on this website...</dd> </dl> </noscript></div> <a id="generate" href="#" title="Hit me again!"></a> </article>
// https://github.com/soulwire/WTFEngine/blob/master/index.html
You can put that in a code or text block. If I am not mistaken, the script will render something in the “#output” container once you hit the “#generate” link or button.
Best regards,
IsmaelApril 26, 2019 at 4:39 pm #1094763Thank you! Sorry for the delay – was working on another project. I will try these instructions in the next couple of days. i really appreciate your help! I apologize also for being confusing.
April 29, 2019 at 8:24 am #1095185Hi,
Thanks for the update. FYI, you can use the wp_enqueue_script function to load the js files.
// https://developer.wordpress.org/reference/functions/wp_enqueue_script/
And the wp_enqueue_style function for the css, but you can just include the css code in the child theme’s style.css file or the Quick CSS field.
// https://developer.wordpress.org/reference/functions/wp_enqueue_style/
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.