TutoTutu
domingo, 19 de junho de 2016
Add CANVAS Edge Animate in Blogspot
My class asked me, "How can I put CANVAS (from Edge Animate) in a blogger?".
Well, this is too simply question. You need put that same part of code of SCRIPT tag and JavaScript tag in another tag. When you write a post in a blogger appear an option "HTML", that option allows you put your code and tags directly.
For example:
<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
<script src="https://code.createjs.com/createjs-2015.11.26.min.js"></script>
<script src="https://raw.githubusercontent.com/Tushn/Misc-codes/master/JS/Pendulus.js"></script>
You can see I put all codes generated for Adobe Edge Animate in "Pendulus.js"
I could use load functions, because I verified if code was loaded, see below:
$.getScript("https://raw.githubusercontent.com/Tushn/Misc-codes/master/JS/Pendulus.js", function(){
load();
init();
});
Dont forget which $.getScript used because jQuery library had been implemented it.
My reference for this is:
http://stackoverflow.com/questions/950087/include-a-javascript-file-in-another-javascript-file
See example below:
Assinar:
Postagens (Atom)