[Archetype JavaScript Framework] Tips for quickly add a librarie to a website...

3 views
Skip to first unread message

TeMs@

unread,
Feb 7, 2009, 7:43:18 AM2/7/09
to archety...@googlegroups.com
As I'm currently working on an Archetype based Maven site for the next archetypejs.org, I had to check some features of EJS template.

I wanted to check that Prototype or jQuery "each" syntax would be available in my template. So I decided to use a bookmarklet to insert one of them dynamically in the embeddedjs.org :

- Prototypize

The code : "javascript:(function(){var head,script; if(!document.getElementById('prototype.js')){head=document.getElementsByTagName('head')[0]; script=document.createElement('script'); script.type='text/javascript'; script.src='http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js'; script.id='prototype.js'; head.appendChild(script);}})(); void(0);"

- jQuerize :

the code : "javascript:(function(){var head,script; if(!document.getElementById('jquery.js')){head=document.getElementsByTagName('head')[0]; script=document.createElement('script'); script.type='text/javascript'; script.src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.js'; script.id='jquery.js'; head.appendChild(script);}})(); void(0);"

How to use these bookmarklets ? Just drag and drop them into your bookmarks, then when you need to add Prototype or jQuery on a site, click on the corresponding "Prototypize" or "jQuerize" in your bookmarks, then open you Firebug console and you can use them :)

--
Envoyé par TeMs@ dans Archetype JavaScript Framework le 2/07/2009 02:22:00 PM
Reply all
Reply to author
Forward
0 new messages