06.2.2010

Apply a custom font to your website, Works on all Browsers

Bookmark and Share
Add to DZone

For web developers and web designers who want to add their FONT to websites without using Standard Web Fonts and without making text as images.

Google has create a Google Font API for public use to give web developers and web designers the ability to use extra fonts on the web, not only the standard web fonts.

Read more »

01.5.2010

More about jQuery AJAX

Bookmark and Share
Add to DZone

jQuery made AJAX simple by using .ajax() function.
The syntax for this function is:

$.ajax( /* properties */);

Now let me explain what properties we can use in this function.

First, I would like to tell you what basic (standard) options for .ajax() as follow:
Properties:
- url: String /* The URL to send the request to */
- type: String /* The request type ("GET", "POST") */
- contentType: String /* default: "application/x-www-form-urlencoded" */
- data: Object, String /* Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key i.e. {foo:["bar1", "bar2"]} becomes '&foo=bar1&foo=bar2' */

Events:
- beforeSend: Function /* This function runs just before sending the request */
- success: Function /* This is an important part. Here we run the code because the request is done */
- complete: Function /* This function runs after the success is done and errors are shown */
- error: Function /* This function runs when error occurred
function(ajaxHnadler,eventHandler){
// ajaxHandler: xmlHTTP object
// eventHandler: handles the event as string
*/
- timeout: Function /* runs when request is timed out */

There are more options, you can check them on jQuery website.
Actually, I cannot create a demo to test all mentioned properties and methods... So, if you experienced a problem or need some help, please contact me.

For more information about jQuery AJAX Please visit: click here.
You can also read about .GET and .POST

10.12.2009

jQuery Animate - Advanced

Bookmark and Share
Add to DZone

Link: http://blog.freelancer-id.com/index.php/2009/05/24/jquery-animate

In the last jQuery Animate article I wrote, I mentioned how to use the .animate() function with few tricks.

But here, I am going to write about jQuery Animate function in general and I will explain few things and some tricks.

The jQuery Animate is a smart object because could be used at any syntax.
I mean,
We can use the default syntax of this function as follow:

$().animate({
/* params */ },
/* integet time period in milliseconds */
);

Read more »

08.3.2009

jQuery: Catch Keyboard Events

Bookmark and Share
Add to DZone

Link: http://www.freelancer-id.com/files/jkey/

Lot of jQuery projects relies on keyboard/mouse event like pressing "p" for previous and "n" for next also using the arrows.

Because this is important, I have managed a code to get the keyboard character on 3 events:
- Keypress
- Keyup
- Keydown

I have created a function to return the key as below:

function getKey(key){
if ( key == null ) {
keycode = event.keyCode;
// To Mozilla
} else {
keycode = key.keyCode;
}
// Return the key in lower case form
return String.fromCharCode(keycode).toLowerCase();
}

Now let's use the events:

/*Keypress*/
$(document).keypress(function (eh){
alert("Keypress: The key is: "+getKey(eh));
});

/*Keyup*/
$(document).keyup(function (eh){
alert("Keyup: The key is: "+getKey(eh));
});

/*keydown*/
$(document).keydown(function (eh){
alert("Keydown: The key is: "+getKey(eh));
});

To see an exaple of this code, please check the demo below:
jKey demo

Have fun.

01.2.2009

Web browsers, Known and unknown browsers.

Bookmark and Share
Add to DZone

There are more browsers than you are aware of. Apart from Firefox, Opera and Internet Explorer there is a number of promising alternatives which can improve your flexibility, increase your productivity and enrich your browsing experience.

In fact, there are over 100 existing (although not widely used) browser applications. Most of them make use of the rendering engines Trident (Internet Explorer), Gecko (Mozilla Firefox), WebCore (Safari) and Presto (Opera 7 and above). However, some of them offer large fields for experiments and exploration — e.g. 3D Engines, but also really useful browsers with advanced functionalities such as desktop-tools integration.

Recently we’ve selected over 20 Win/Mac/Linux-browsers, installed most of them, tested them, compared them and now present the results below. Let’s take a closer look at some rather unknown, forgotten, advanced or experimental browsers. What else do we have on the horizon? What should we use? And what might we be willing to use? Apparently, between Firefox, Opera and Internet Explorer there is enough room for creative and unusual approaches.

Read more »

Pages: 1 · 2 · 3 · 4 · 5

Free Blog Themes / Templates