Writing Custom Callback for ajax

In this post, I will share how could you use callbacks to write efficient and maintainable ajax using callbacks. Promises can also be use but here i will discuss it with callbacks.
The definition of callback is
A reference to executable code, or a piece of executable code, that is passed as an argument to other code. 
Let's see an example code of custom callback,
function test(param1, param2, callback) {
    alert('Started function.\n\nIt has: ' + param1 + ', ' + param2);
test('foo', 'bar', function() {
    alert('Finished function.');

Flexy Menu - Responsive Horizontal & Vertical Menu | Basic Aria

Recently I have to add Aria to Flexy menu. I have attached the code.

	jQuery.fn.flexymenu = function(options){
		var settings = {
			 speed: 300,
			 type: "horizontal",
			 align: "left",
			 indicator: false,
			 hideClickOut: true,
			 submenuTrigger: "hover",
			 showDelay: 0,
			 hideDelay: 0,
			 mobileShowDelay: 0,
			 mobileHideDelay: 0,
			 scrollable: false,
			 scrollableMaxHeight: 400
		$.extend( settings, options );
		var bigScreen = false;
		var menu = $(this);
		var lastScreenWidth = windowWidth();

Masonary with Lazy Load

Hi Guys, You can easily integrate lazyload with masonary. The following code will be helpful to you.
        effect: 'fadeIn',
        effectspeed: 1000,
        threshold: 200,
            var $container = jQuery('.is_masonry');
            }).imagesLoaded(function() {   $container.masonry();  });