Making a jQuery plugin
Making a jQuery plugin In this tutorial, we will see how to make a jquery plugin. First step is to create a self executing function. Inside this function we will create our own functions e.g. if we want to create a function then we should pass the jquery object to the self executing function to define a function just add property of the $.fn object e.g if the function name is test the definition should be $.fn.test = function(<optional_parameters>) {}; To call the function, just use $("selector").test(); In this tutorial, we will see how to make a chess borad (8 * 8), First step is to print the board and then place the correct animals in the correct positions. 1.$.fn.board - In this method, we make the design of the board using javascript ECMA script 6 2.$.fn.initilaize - In this method, we place the animals in their appropriate positions <html> <head> <script src="https://ajax....