Showing posts with label Google Api. Show all posts
Showing posts with label Google Api. Show all posts

Tuesday, 19 June 2012

jQuery: what if Google Libraries API is offline?

   


When we build pages with jQuery, we have two possible way of including the library.
First we can actually save the .js file in a specific folder of our web site and then include it directly.
Another way is to use the Google Libraries API deposit and get it from there.

But what if the GLA is not available? In those cases some functionality might be lost.
Here I show you how to create a proper fallback.

Friday, 15 April 2011

Google Font Api

   


Following other recent posts about using non-standard fonts, I would like to show how Google Font Api is working.
Following the examples in the related page, we can create text with a custom font. In reality there's a quite wide selection of available fonts, however it is limited. If you think it is too limited, then search the blog for other solutions.


The basic function of Google Web Fonts is linking to the Google Api. Put the following code in the <head> of your document:
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine">
<style>
   h1 {
        font-family: 'Tangerine', serif;
        font-size: 48px;
        }
</style>