JSFiddle - React, Tailwind, and code Playground

by vicky081

HTML

<body>
    <div id="container">
        <div id="content">
            Hi Folks I am Trying to Create New Jquery Plugin
        </div>
    </div>
</body>

CSS

#container {
    width:100%;
    height:100%;
}
#content {
    float:left;
}

JavaScript

(function($) {
    $.fn.gettingmessage = function(options) {
           
        var defaults = {
            variable1: true,
            variable2: true,
            variable3: true,
            variable4: true
        }
        var settings = $.extend({}, defaults, options);

        if (settings.variable1) {

        var element = this;

        $(element).ready(function() {

            alertingcontent();

            function preventnextpage() {
                return false;
            }
           
            function alertingcontent() {
                alert("nicely done");
            }
        });
    };
    };

})(jQuery);
        
$(function(){  
    $.fn.gettingmessage({variable1:true})  
});