What I'm try to accomplish is create a jqyery plug in that will control the CSS on targeted paragraph.
I have done some research on the custom plug-in's and have not found any article explaining what i need. I tried creating the bottom code snipped but it didn't work, am i missing something or incorrect all together.
When creating a plugin does it follow the conventional jquery setting ? Books or url is also appreciated
(function($){
$.fn.changeletter= function(options){
var setting = $.extend({
color:"white",
backgroundColor:"red",
font-size:"15px"},options);
return this.css({
color:setting.color,
backgroundColor:setting.backgroundColor,
font-size:setting.front,
});
};
}(jQuery));
//Code
$("p").changeletter({
color:"red",
backgroundColor:"black",
font-size:"100px",
});
font-size(fontSizeor'font-size'). Have you checked your browser's JavaScript console? Because that should have raised an error.