Howdy peoples of CSS-TRICKS.. I am not new to coding but i am very new to plugin authoring (yeah i know im way behind the curve). But im dabbling with a few lines of code and seeing about turning it into a plugin. Ive read the documentation from the jQuery source, but im having trouble with settings and using the settings as parameters.
The jsFiddle has my code that i am using in attempts to convert to a plugin (fail). If y'all have some suggestions or hints, i would be very grateful. I can read tutorials all day but until i actually sit down and do this stuff, i wont understand it. And i think this is a great little starting point for me.
Howdy peoples of CSS-TRICKS.. I am not new to coding but i am very new to plugin authoring (yeah i know im way behind the curve). But im dabbling with a few lines of code and seeing about turning it into a plugin. Ive read the documentation from the jQuery source, but im having trouble with settings and using the settings as parameters.
Here is the code i am wanting to convert:
function r_num() { return (Math.floor(Math.random() * 256)); } !function seizure() { $('body').css('background', 'rgba('+r_num()+','+r_num()+','+r_num()+',1)'); $('body').html($('body').css("background-color")); setTimeout(seizure, 50); }();The jsFiddle has my code that i am using in attempts to convert to a plugin (fail). If y'all have some suggestions or hints, i would be very grateful. I can read tutorials all day but until i actually sit down and do this stuff, i wont understand it. And i think this is a great little starting point for me.
jsFiddle code
This is an amazing resource: http://shichuan.github.com/javascript-patterns/#general-patterns
@TheDoc,
YES! Thanks man for that resource. See, ya learn something new every day. You just made my life super easier, thanks again bruh!
If you're talking about creating a plugin to release to people, make sure you read further down: http://shichuan.github.com/javascript-patterns/#jquery-plugin-patterns
@TheDoc: +1