how to change css class name using javascript

Most of the programmers don’t know about how to change css class name using javascript, specially beginners.Its very easy to change css style using javascript on any event .You just have to make a javascript function with one line and call that function on any event like onLoad , onclick etc.

suppose you want to chane css of a div when click on a button or any link.A simple div which has some text and on click on a button you want to change the border color and background color of that div.To do this first make your css class in your .css file .

Read the rest of this entry »

How to speed up my site

Each and every single web site owner wants to see his/her website pages load faster than others but only some of them got it because its depend on server , network speed and mostly on programmer’s work strategy.An intelligent programmer always try to make site faster.Becasue when user surf a web site they want to run that faster and if site run slow than they switch to other site.The load time of websites is one of the most important factors affecting its usability; most Internet users will just skip a site altogether if it fails to load within a couple of seconds.

1. Optimize Images: always use Optimized images on a web page. Images represent the heavier load on virtually any website so make sure you are optimizing them. Alternatively you can also turn to an online image optimizer.When save image in an image editor try to save them with low resolution and save them using shift+ alt + ctrl +s for a web page.Even try to minimize image on a web page and make effect using css that will load the page faster.

Read the rest of this entry »