Code Archive

  • jQWizard is a jQuery plugin for creating nice looking html wizard forms. Features Light weight. Supports upto five steps. Works with IE6+, Firefox, Chrome, Safari, Opera and all other browsers...

    jQWizard Version 1 Released

    jQWizard is a jQuery plugin for creating nice looking html wizard forms. Features Light weight. Supports upto five steps. Works with IE6+, Firefox, Chrome, Safari, Opera and all other browsers...

    Continue Reading...

  • 1. Use small letters to name files.eg: reviews.php 2. Use hyphen (-) to separate filenames with mutiple words. eg: user-reviews.php

    PHP coding conventions

    1. Use small letters to name files.eg: reviews.php 2. Use hyphen (-) to separate filenames with mutiple words. eg: user-reviews.php

    Continue Reading...

  • CSS Naming Conventions Basic Rules 1. Use small letters to name classes and id’s . eg: #footer, .round 2. a.  Use hyphen (-) to separate mutiple words. eg: #main-container, .round-box,...

    CSS coding conventions

    CSS Naming Conventions Basic Rules 1. Use small letters to name classes and id’s . eg: #footer, .round 2. a.  Use hyphen (-) to separate mutiple words. eg: #main-container, .round-box,...

    Continue Reading...

  • Add maxlength attribute to the <input> tag eg: <input type=”text” maxlength=”4″ /> The above textbox can have only 4 characters. Please note that the maxlength attribute is not supported for...

    Limiting characters in input textbox in HTML

    Add maxlength attribute to the <input> tag eg: <input type=”text” maxlength=”4″ /> The above textbox can have only 4 characters. Please note that the maxlength attribute is not supported for...

    Continue Reading...

  • Add the following lines to the .htaccess file <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|bmp|js|css|swf)$"> Header set Expires "Thu, 14 Apr 2016 20:00:00 GMT" </FilesMatch> To check whether this is working, use Google PageSpeed or...

    Adding Expires Header using Htaccess

    Add the following lines to the .htaccess file <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|bmp|js|css|swf)$"> Header set Expires "Thu, 14 Apr 2016 20:00:00 GMT" </FilesMatch> To check whether this is working, use Google PageSpeed or...

    Continue Reading...

  • Add these lines to the .htaccess file. AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE...

    Enable Gzip Compression using Htaccess

    Add these lines to the .htaccess file. AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE...

    Continue Reading...

  • An xsl template for splitting strings. Template: <xsl:template name="StrSplit">     <xsl:param name="str" />     <xsl:param name="separator" />     <xsl:choose>         <xsl:when test="contains($str, $separator)">             <xsl:call-template name="StrSplit">               <xsl:with-param...

    xsl Template to split strings

    An xsl template for splitting strings. Template: <xsl:template name="StrSplit">     <xsl:param name="str" />     <xsl:param name="separator" />     <xsl:choose>         <xsl:when test="contains($str, $separator)">             <xsl:call-template name="StrSplit">               <xsl:with-param...

    Continue Reading...

  • Smooth scrolling of name tags (anchor, <a>) in HTML using jQuery Got this from some blog.� I don’t remember the link. $(function(){ $('a[href*=#]').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname...

    Smooth scrolling of name tags (anchor) in HTML using jQuery

    Smooth scrolling of name tags (anchor, <a>) in HTML using jQuery Got this from some blog.� I don’t remember the link. $(function(){ $('a[href*=#]').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname...

    Continue Reading...

  • The fix is posted in http://wordpress.org/support/topic/170320?replies=12#post-741557. I am just copying it for easy reference. Look in thickbox/thickbox.css Around line 50, change all the below #TB_window { position: fixed; background: #ffffff;...

    ThickBox IE7 positioning bug fix

    The fix is posted in http://wordpress.org/support/topic/170320?replies=12#post-741557. I am just copying it for easy reference. Look in thickbox/thickbox.css Around line 50, change all the below #TB_window { position: fixed; background: #ffffff;...

    Continue Reading...

  • Here is a simple fixed width css rounded box. Download Live Example Sample Rounded Box The Rounded Box will look like this. This rounded box uses two background images, one...

    Simple Fixed Width Rounded Box with CSS

    Here is a simple fixed width css rounded box. Download Live Example Sample Rounded Box The Rounded Box will look like this. This rounded box uses two background images, one...

    Continue Reading...