ahh i didn't know about <blink>, but the setInterval I think is what
i'm looking for. I couldn't get it to work tho. I don't think i
inserted the code right. This is what i did:

<script type="text/javascript">
$(document).ready( function() {
        $("table.striped tbody tr").mouseover( function() {
                $(this).animate({backgroundColor: "#4d4d4d"}, {queue:false, 
duration:
350 });
        }).mouseout( function() {
                if($(this).attr("class") == "odd") {
                        $(this).animate({backgroundColor: "#1a1a1a"}, { 
queue:false,
duration:350});
                } else {
                        $(this).animate({backgroundColor: "#343434"}, { 
queue:false,
duration:350});
                }
        });
        $("table.striped tbody tr:odd").addClass("odd");
        $("table.striped tbody tr:even").addClass("even");

setInterval(function() {
     $('tr:lt(2)').toggleClass('blinky');
}, 500);

});

</script>

Since its set to have the first two <tr> to blink i don't need to put
<div id="blinky"> before the <tr> I want to blink?
How can you add a fade in and fade out to setInterval? I think that
would make it alot smoother between blinks.

On Jul 1, 10:15 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> You could try this:
>
> <blink>I'm blinking like it's 1999</blink>
>
>   :-)
>
> Or you could use a setInterval:
>
> setInterval(function() {
>      $('tr:lt(2)').toggleClass('blinky');
>
> }, 500);
>
> That one toggles the "blinky" class on the first 2 TR elements every
> 1/2 second.
>
> --Karl
> ____________
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Jul 1, 2008, at 9:15 PM, sketchy wrote:
>
>
>
> > I think you misunderstood my post. It works fine but i'm looking to
> > add more with an effect such as flashing/blinking rows to represent
> > that its important to the visitor to check it out.
>
> > On Jul 1, 2:55 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> >> A zebra stripe doesn't need any Javascript given IE7, either. The
> >> tr:hover bit is accepted by the browser if your doctype is set to
> >> strict mode.
>
> >> On Jun 30, 10:15 pm, sketchy <[EMAIL PROTECTED]> wrote:
>
> >>> I recently got acquainted with jquery and implemented this
> >>> tutorial on
> >>> zebra striping to my 
> >>> site:http://docs.jquery.com/Tutorials:Zebra_Striping_Made_Easy
>
> >>> and its awesome but i was wondering it its possible to add like a
> >>> blinking/flashing effect to one or a couple of the rows. The effect
> >>> would start when the visitor opens the page and then stop when they
> >>> leave.
>
> >>> My knowledge on jquery is quite limited right now so it would
> >>> great if
> >>> someone could help me out. Thanks

Reply via email to