Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.fn.flex = function ( options ) {
- var p = this.data("flex"),
- opts = options || {};
- if (p) return p;
- this.each(function () {
- p = new Flex( this, opts );
- $(this).data("flex", p);
- });
- return opts.api ? p : this;
- };
- <script type="text/javascript">
- $(function() {
- $(".flex").flex();
- });
- </script>
- TypeError: jQuery(...).flex is not a function
- <script src="/path/to/jquery.js"></script>
- <script src="/path/to/the-plugin.js"></script>
- foo = function () {
- // this is a minimal function
- };
- $.fn.flex = function ( options ) {
- // ideally some code here
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement