June 2017
Beginner to intermediate
338 pages
9h 2m
English
<script>// the plugin itself(function ($) { $.fn.canYouFindIt2 = function() { return this.css("background-color", "lightsalmon"); }})(jQuery);// calling the plugin $('a').canYouFindIt2();</script>
$.fn.canYouFindIt2 = function( options ) { var defaults = $.extend({ cssProperty: 'background-color', cssValue: 'lightsalmon' }, options); // step 3 will be added here}
return this.each(function(i, elem) { var $currentIndex = $(elem); $currentIndex.css(defaults.cssProperty, ...Read now
Unlock full access