Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On sucess callback with arguments #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ychaouche
Copy link

Small change to allow caller to pass on a callback function and its arguments that would be called whenever retreival of feed is done:

From caller's perspective :

function callback(args){
   [...]
}

$("#myid").FeedEk({
FeedUrl       : url      ,
MaxCount      : 20       ,
ShowDesc      : false    ,
ShowPubDate   : false    ,
[...]
/* New options */
Callback      : callback ,
Callback_args : {...}    ,
});

Changes made to Feedk.js' success property :

        success: function (data) {
        ...
            if (def.Callback) {
                def.Callback(def.Callback_args);
            }
        }
    });
};
})(jQuery);

…rguments that would be called whenever retreival of feed is done:

From caller's perspective :

    function callback(args){
       [...]
    }

    $("#myid").FeedEk({
    FeedUrl       : url      ,
    MaxCount      : 20       ,
    ShowDesc      : false    ,
    ShowPubDate   : false    ,
    [...]
    Callback      : callback ,
    Callback_args : {...}    ,
    });

Changes made to Feedk.js' success property :

            success: function (data) {
            ...
                if (def.Callback) {
                    def.Callback(def.Callback_args);
                }
            }
        });
    };
    })(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant