How to edit and test javascript / jquery online

Ever hear of jsFiddle? Try it – it’s a really cool tool to use for developing javascript and even sharing your code by just passing a URL. Here’s a simple example: http://jsfiddle.net/r7MgY/. Add your HTML, CSS, and Javascript; hit run at the very top, and see the executed result. Now since they are in Alpha [...]

Share

How to add Drupal data to Javascript using drupal_add_js

There are times when one will need to pass Drupal data in Javascript or JQuery. One example that comes to mind is for analytics purposes, say after a user clicks on a specific link, you’d want to find the node type of the page the user made this click. In your .tpl.php, template.php file or [...]

Share