Return to Snippet

Revision: 41297
at February 15, 2011 20:42 by vestimir


Initial Code
(function($) {
        $.fn.PLUGIN_NAME = function(options) {
        var opts = $.extend({}, $.fn.PLUGIN_NAME.defaults, options);
        return this.each(function() {
            $this = $(this);

            $this.css({ 'color': opts.color });
            $this.html($.fn.PLUGIN_NAME.METHOD(opts.text));
        });
    };

    $.fn.PLUGIN_NAME.METHOD = function(txt) {
        return txt;
    };

    $.fn.PLUGIN_NAME.defaults = {
        color: 'red',
        text: 'Hello world! '
    };
})(jQuery);

Initial URL


Initial Description


Initial Title
jQuery plugin skel

Initial Tags
js, plugin, template, jquery

Initial Language
jQuery