d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Question About Website
Add Reply New Topic New Poll
Member
Posts: 13,703
Joined: Mar 30 2007
Gold: 0.00
Nov 10 2015 10:14am
Hey guys on this website: http://fossbytes.com/what-exactly-is-quantum-computing/

They have an awesome dynamic firework background, where you can click and it shoots a firework at that spot. It also does it at random, but my question is what is doing this? I cant seem to find it by inspecting the element so any help would be awesome!

I cant tell if its just css/html or if its JS?

Thanks,
Member
Posts: 13,981
Joined: Dec 9 2007
Gold: 1,735.00
Trader: Trusted
Nov 10 2015 11:12am
The website uses scripts written in JavaScript to draw the fireworks onto a HTML5 canvas element. :)

If you inspect the website, you can see that they use a file called fireworks.js located in scripts under resources
Member
Posts: 13,703
Joined: Mar 30 2007
Gold: 0.00
Nov 10 2015 11:16am
Quote (Xaysia @ Nov 10 2015 10:12am)
The website uses scripts written in JavaScript to draw the fireworks onto a HTML5 canvas element. :)

If you inspect the website, you can see that they use a file called fireworks.js located in scripts under resources


Thanks mate!

Edit: Do you know how they call it on the public html page?

This post was edited by bta44 on Nov 10 2015 11:22am
Member
Posts: 2,757
Joined: Nov 26 2007
Gold: 1,214.81
Nov 10 2015 12:09pm
if you're using chrome...

Press F12
Click "Sources" tab
Press Ctrl+P
Type "fireworks.js"
There you can see the source code for the javascript
Member
Posts: 13,703
Joined: Mar 30 2007
Gold: 0.00
Nov 10 2015 12:26pm
Quote (labatymo @ Nov 10 2015 11:09am)
if you're using chrome...

Press F12
Click "Sources" tab
Press Ctrl+P
Type "fireworks.js"
There you can see the source code for the javascript


I got the JavaScript file, I am trying to show it on my public_html file so I can see the fireworks when I open the page.
I have src'ed the JS file, now I need to know how to call it in html.
Member
Posts: 29,350
Joined: Mar 27 2008
Gold: 504.69
Nov 11 2015 09:46pm
Quote (bta44 @ Nov 10 2015 02:26pm)
I got the JavaScript file, I am trying to show it on my public_html file so I can see the fireworks when I open the page.
I have src'ed the JS file, now I need to know how to call it in html.


Seems like they just made a canvas named ... canvas.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll