I want to change the attribute of a class on which all element that use the class for the rest of the web application life (from start of use until the user exits the web ap
Try with this: http://jsfiddle.net/tRqBV/5/
$(function () { $(".myClass").css("background", "green"); $("p").last().after("Now!"); $(document).ready(function () { $('div.myClass').css("background", $('p.myClass').first().css('background-color')); }); });