You're right that was super easy! Now, I have one more problem to solve that I cannot figure out (it's a cosmetic problem.)
Basically, I want the div to "light up" with the users select color, however, if they do not click, change it back to the color it was before. Here is my code snip-it for that (also posted above). It does pickup the color the user has selected (from an input box), but if you scroll across the div the whole background color vanishes. I suspect because the DIV has a style="background-color:blah" is the problem. The div is automatically populated, so there is no putting it into the css file. Any suggestions :)? \$(".button").hover(function () { var color = \$("input#color_code").val(); var p_color = \$(this).css("background-color"); \$(this).css({ backgroundColor:color }); }, function () { \$(this).css("background-color") == p_color; }); --This even will also need to use livequery eventually, but i at least want to get it working correctly before I push it over. Thanks EVERYONE for all your assistance, jQuery is a lot of fun! On Sep 5, 8:01 am, Ca-Phun Ung <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Thank you for showing me the correct way to do that? > > > My next question really is, why after the user clicks on my div, does > > the content reload from creator.pl does jQuery stop watching the > > pixels inside #results. It doesnt do my hover effect and you cannot > > click on any of the divs to re-send creator. > > This is a common problem with Ajax loaded content. There are two routes > you could take; 1) Re-bind the event handlers or 2) Event delegation. > > There is an excellent plugin called livequery [1] which automatically > does the re-binding for you. I think this will save you some stress :) > > [1]http://brandonaaron.net/docs/livequery/