I think you could do something like:

$("div").each(function() {
    $(this).css('color', 'red');
}); 

Basically all this is doing is looping over each DIV on your page and at
each DIV (this) it's changing the color of that div.  

Here is another one I did for a recent project - I have a list of div's
each with a 'container' class:

<div class="container">Item 1</div>
<div class="container">Item 2</div>
<div class="container">Item 3</div>
<div class="container">Item 4</div>
<div class="container">Item 5</div>

I wanted to highlight the background of each div as the user rolled
their mouse over them - this was basically a hack for IE6:

$('div.container').hover(function() {
        $(this).addClass('pretty-hover');
}, function() {
        $(this).removeClass('pretty-hover');
});

Again - this is just saying - when you hover your mouse over THIS
div.container - add a class.  When you move your mouse off of it -
remove the class.

I think if you tinker around with stuff like this a bit - it start to
click.

Jim

> -----Original Message-----
> From: FrankTudor [mailto:[EMAIL PROTECTED] 

> I can't 'write' or 'create' in the environment i working.  Could you
> maybe work the example so that it outputs to the screen.  I can make a
> sample file with 'div' tags point to my jquery.js file.  I have done
> jquery scripts without the 'this' part and I would attempt to change
> it but 'this' is a stumper for me.
> 

Reply via email to