Home > JavaScript > JavaScript – shadow

JavaScript – shadow

123
    // shadow theory
    (function($){
        // my briefcase
        var _opt;
        var _css;
        var _html;

        // in to out
        $.fn.shshadow = function(param){
            // hold main request.
            _root = $(this);
            _shadow = _root.attr('id');
            // class extend
            _opt = $.extend( {} , param, $.fn.shshadow.defaults );
            // generate the law
            _html = '<div \
                style ="width:atuo;height:auto;padding:5px;background-color:#AAB8C3;\
                "></div>';
            // apply the plane
            $(this).before(_html).appendTo( '.' + _shadow ).css({
                        'margin-top': '-15px',
                        'margin-left':'-2px',
                        'margin-bottom':'-1px',
                        'margin-right':'-2px',
                        'border': 'solid 1px #000000',
                        'opacity': '0.90'
            });
            // for future access.
            return _opt;
        }

        // out to in
        $.fn.shshadow.defaults = {

        };

    })(jQuery);

    $('#try').shshadow();

Download:
http://dpaste.de/esLK/

Advertisements
Categories: JavaScript
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: