Provides a class functionality for jQuery

Installs: 1

Dependents: 1

Suggesters: 0

Type:contao-component

1.0.0 2018-12-29 14:00 UTC

README

Provides an ordinary class functionality for jQuery. This is an contao-component.

Class declaration

var myClass = new jqClass({
    options: {
        content: null,
        container: null
    },

    initialize: function(options) {
        this.setOptions(options);
    },
 
    speak: function() {
        this.options.container.html(
            '<b>' + this.options.content + '</b>'
        );
    }
});

Usage

var mytest = new myClass({
    content: 'foo',
    container: $('#bar')
});

mytest.speak();