Codes...

jQuery.test = function(val) {

    jQuery.test.foo = function() {
       alert( "foo" + jQuery.test.bar()  );
    };

    jQuery.test.bar = function() {
       return "bar" +val;
    };

    jQuery(document).ready(function() {

            jQuery.test.foo();

    });
};

// To use

<script>

jQuery.test("Tom");

</script>


Is  my style of writing jQuery plugin correct?

Thanks for comments...

Reply via email to