Created
June 4, 2012 13:35
-
-
Save claus/2868415 to your computer and use it in GitHub Desktop.
Load jQuery with PNGDrive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>PNGDrive.js</title> | |
| </head> | |
| <body> | |
| <p><a href="https://github.com/MadeInHaus/PNGDrive">PNGDrive on GitHub</a></p> | |
| <script src="../lib/pngdrive-min.js"></script> | |
| <script> | |
| function doStuff() { | |
| var div = $("<div>Hello World from jQuery!</div>").css("margin-left", 300).animate({"margin-left": 0}, 3000); | |
| $("body").append(div); | |
| } | |
| var image = new Image(); | |
| image.src = "images/jquery-1.7.2.min.png"; | |
| image.onload = function(e) { | |
| var pngdrive = new PNGDrive(e.target); | |
| eval(TextDecoder('utf-8').decode(pngdrive.getFileByName("jquery-1.7.2.min.js").content)); | |
| doStuff(); | |
| } | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment