A simple function can be used to set elements in the center dynamically. [javascript] jQuery.fn.center = function () { this.css(‘position’,’absolute’); this.css(‘top’, ( $(window).height() – this.height() ) / +$(window).scrollTop() + ‘px’); this.css(‘left’, ( $(window).width() – this.width() ) / 2+$(window).scrollLeft() + ‘px’); return this; } [/javascript] This can be called using [javascript] $(function(){ $(“#a”).center(); }); [/javascript] Where…Continue reading How to center an element using jQuery
Month: July 2011
jQuery Flying Twitter Bird Script
Hey guys! Today I have developed a small script to show a flying twitter bird on a web page. It is easy to install, and it won’t take more than a minute! This twitter bird will fly from left to right and will stop when you hover your mouse. Take a look at the…Continue reading jQuery Flying Twitter Bird Script
Custom Google Plus URL
Hey! If you want a custom Google+ URL with your own domain,like http://www.vivekv.com/+/about/ , all you have to do is to append this line in your .htaccess file. If you do not have a .htaccess file placed in your root directory ( mostly in public_html ) create one. Please note that this is applicable only…Continue reading Custom Google Plus URL
“Exploding” Testimonial Page using PHP + JQuery
Dear friends, First of all, thank you for your continued support, I’ve heard many positive reviews about my blog ( though I don’t post much on this blog ) So, I was doing some enchantments on our hosting site http://www.sunshellhosting.com and adding some more client testimonials. So I come up with an ‘exploding’ testimonial box…Continue reading “Exploding” Testimonial Page using PHP + JQuery