Skip to content

Instantly share code, notes, and snippets.

View rs-renato's full-sized avatar
💻
Sem a menor pressa. Calculadamente

Renato Rodrigues rs-renato

💻
Sem a menor pressa. Calculadamente
View GitHub Profile
@rs-renato
rs-renato / jquery_plugin_callback.md
Created November 24, 2017 11:40 — forked from ultim8k/jquery_plugin_callback.md
Adding a callback handler to a jQuery plugin

Adding a callback handler to a jQuery plugin

(function($){
	$.fn.myAwesomePlugin = function(settings) {
		var callback = settings.callback;
		if ($.isFunction(callback)) {
			var parameter = 'Hello World';
			callback.call(this, parameter);
 }