Ampare jQuery-OddEven.js Playground
Download and Read Very Easy Documentation
let rand = Math.random() * 20; for(let i = 0 ;i< rand ; i++){ jQuery('#test').append('
'); } let evennumber = 1; jQuery('#test div').even().each(function(){ jQuery(this).html('I am Even Number '); }); jQuery('#test div').odd().each(function(){ jQuery(this).html('I am Odd Number ' ); }); jQuery('#test div').odd().click(function(){ alert(" I say I am the odd"); }); jQuery('#test div').even().click(function(){ alert("Hello I am even"); }); jQuery('#test div').evenoddbgcolor('#3498db','#e74c3c'); jQuery('#test div').oddcolor('#2c3e50'); jQuery('#test div').oddevencss('height','70px','height','60px'); jQuery('#test div').evenoddcss('font-size','20px','font-size','17px'); jQuery('#test div').evenoddcss('text-align','center','text-align','center');
Run This