Category: Misc


Arabic web fonts are here

Posted by Alaa Badran in Browsers, CSS, Design, HTML, Misc, Web & Programming. 3 comments

16th November

Because Arabic websites are lack of Arabic web Fonts, i have developed a website called FontFace.me to serve web fonts for Arabic language.
FontFace.me is a free service to use. I also have FontStatic.com domain to be the CDN to serve CSS and Font files.



Stop using apps for Git, use command line

Posted by Alaa Badran in Free Stuff, Misc, Web & Programming. 7 comments

19th November

In this article, i explain how to use Git and how to use its commands. I see that commands are better than using apps because when using commands, you know what you did. Also you can fix problems when it happens..



Tips for Better Website Performance

1st July

I am here not talking about Server-side improvements. I am here talking about Front-End improvements that really affects the web page speed.

The time spent till the website is running on the client’s browser. If we analyze that time, we will get:

Request Time (in milliseconds)
Server Process Time, or response time (usually in milliseconds)
Downloading web page and files into browser (few to several seconds, depending on internet speed)
Rendering on browser.



Drag and Drop with jQuery for Touch Devices

23rd January

In the last post: Drag and drop with HTML5, i explained how to drag and drop using HTML5 and Javascript (jQuery). I mentioned that touch devices such as iPhone, iPad, BlackBerry, Samsung…. etc, does not support HTML5 Drag and Drop features.

Now, in this post, i want to explain how to make Drag and Drop possible for all devices. Before we start, you must know that it’s all about Javascript.. And i will use jQuery library while i am familiar with it and it simplifies writing javascript.


How to: Drag and Drop with HTML5

26th December

Drang n’ Drop in HTML 5 is supported by: IE9+, Firefox 3.6+, Safari 4+, Opera 11+ and Chrome 12+. But its not supported yet for touch devices like Touch Mobiles and Tablets.
To make things more clear, its not only HTML 5.. Its a combination between HTML 5, CSS 3, and Javascript.



5 Resources for Free PNG icons

Posted by Alaa Badran in Design, E-Commerce, Misc. 1 Comment

9th April

I have collected 5 resources for free PNG icons. They could be used on websites, mobile applications and other stuff.
They are available with multi-dimentions as follow:

 

1) 25 Glossy iPhone style icons

These icons are available with PSD file. Free to download.


15 Free IDEs for Developers

18th March

Komodo Edit (Windows, Mac, Linux)

Komodo Edit is an open source application that has support for PHP, Python, Ruby, JavaScript, Perl, Tcl, XML, HTML 5 and CSS 3.

It has syntax coloring, folding, background syntax checking,  auto-complete and calltips. It also includes libraries for autocompletion for jQuery, Ext JS, Ruby on rails and more.

I just recommend Komoodo Edit.


jQuery: Catch Keyboard Events

18th June

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 … Read More »


Scroll window smoothly using jQuery

26th March

Using jQuery animate() function to do a smooth scrolling:

I have also created a div as follow:

<div id=”scrollToHere”>
Scroll to here
</div>

You need something to run your script. Create a button like this:

<input type=”button” onclick=”scollWin();” value=”Scroll up” />

The jQuery Code will be like this:

function scrollWin(){
$(‘html,body’).animate({
scrollTop: $(“#scrollToHere”).offset().top
}, 800);
}

Here is something to try:

now jQuery window scrolling is done with animation.

Enjoy it..


Web page transparency for all browsers

Posted by Alaa Badran in Browsers, CSS, Design, DHTML, Misc, Web & Programming, XHTML. 1 Comment

8th February

Every browser has different CSS properties for less-used actions like: transparency or opacity.
It was something weird to do transparency on your web page because there are lot of different web browsers. To make that easy, I have collected information and generated a CSS class that will work on most of the browsers.
See the Code below:

.transparent {
filter:alpha(opacity=75);
-moz-opacity:0.75;
-khtml-opacity: 0.75;
opacity: 0.75;
}

filter:alpha(opacity=75); is used for Internet Explorer.
-moz-opacity:0.75; is used for Mozilla, Firefox, Netscape browsers (old versions).
-khtml-opacity: 0.75; is used for old versions of Safari.
opacity: 0.75; is used as a standard CSS property for browsers like Firefox 2+ and Safari 3+ and Opera