If you’ve ever looked at the HTML code that your Drupal site spits out, you may have noticed something like this in the <head> section:
jQuery.extend(Drupal.settings, { "basePath": "/" });
And you may have thought, “So what? Drupal stores the base path in an array. Big whoop.” Well, what’s cool about this is that it’s one of the ways Drupal makes it easy for you to pass values computed in PHP to your jQuery scripts. ... Read more