Category Archives: Javascript


CSS: Full Page (Screen) Background Image Slideshow: Made Easy

Full screen background image that span all over the browser window is getting much more popular now. It definitely catches visitor’s eye and boost the overall design of the website. It looks much more colourful and attractive. Few examples of some awesome looking websites are TeleTech, Vivo Group, Chicago L-Shirts and Fleming Steele. This snippet is not specific to WordPress except that it require jQuery and uses WordPress conventions. Please note that it does not require any jQuery plugin.


Shortcode: Twitter Bootstrap Collapse aka Accordian

Twitter Bootstrap is a decent, intuitive, and powerful front-end framework for faster and easier web development. Talking about WordPress primarily as CMS, we want to manage everything from the backend. But, Twitter Bootstrap’s components are not developed to be used from a WordPress backend. We will try to overcome this gap by implementing WordPress shortcodes for all of the Twitter bootstrap components. Let’s start with the Collapse


Snippet: Load Contact Form 7 javascripts where required

Add following snippet to “functions.php” Snippet

Included Javascript at  or footer

Snippet: Add custom javascript file

Add following snippet to “functions.php” Snippet Result By default this snippet will insert the javascript within the tags. It is always recommended to include the javascript in footer to increase the page load  time. Please see set 5th parameter to “true” to make the javascript load in footer. See full details here.

Snippet: Loading jQuery from the Google CDN

CDN Content Delivery network is the most reliable way to getting content from internet, then why not add jQuery from CDN.