I have add this code on my page
and it working fine but there is a lot of empty space at the middle of page and i can't fix it

empty space not related to loading effect and is result of your css and html codes , but perhaps u write middle things into a div tag with loading id. in this case , u shuold change #loading style and remove 'line-height: 350px;' or decrease its value.( hamkeshavari! )