Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset=utf-8>
- <title></title>
- <script>
- var functions = [];
- </script>
- </head>
- <body>
- <!-- this part will be changed dynamically by the CMS -->
- <script>
- functions.push(function() {
- if(typeof jQuery !== 'undefined') {
- alert('jQuery is defined');
- } else {
- alert('jQuery is undefined');
- }
- });
- functions.push(function() {
- $(function() {
- alert('this one on DOM ready');
- });
- });
- </script>
- <!-- end of dynamically created part -->
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
- <script>
- var len = functions.length;
- for(var i = 0; i < len; i++) {
- functions[i]();
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement