Return to Snippet

Revision: 35680
at November 12, 2010 00:16 by touffies


Initial Code
/*  ------------------------------------------------------------------
    Fix Input Focus -------------------------------------------------- */
    $.fn.inpFocus = function(settings) {
        // defaults settings
        settings = $.extend({
            classFocus: "inpFocus"
        }, settings);
        return this.each( function() {
           $(this).find("input:text, input:password, textarea, select").each(function(){
                $(this)
                .bind("focus.inpFocus", function(){
                    $(this).addClass(settings.classFocus);
                })
                .bind("blur.inpFocus", function(){
                    $(this).removeClass(settings.classFocus);  
                })
                .blur();// now change all inputs
            });
        });
    };

Initial URL

                                

Initial Description

                                

Initial Title
Fix Input Focus

Initial Tags
ie, jquery

Initial Language
jQuery