raulriera
raulriera

Reputation: 724

Odd jQuery IE problem

I am trying to implement this function which works everywhere except every IE version (go figure)

<script type="text/javascript">
     $(function() {
         $('#twitterUserTimeline').liveTwitter('#regional from:el_carabobeno', {refresh: false, mode: 'search', showAuthor: false}, function(container, newCount){
           $(".tweet:not(:first)").addClass('hidden'); // hide all twets but the first one
         });

         $("#twitterUserTimeline").hover(function () { // on hover
            $(".tweet:not(:first)").removeClass('hidden'); // reveals them
          }, function () { // on out
            $(".tweet:not(:first)").addClass('hidden'); // hide them again
          }
        );
     });
</script>

IE doesn't seem to like those selectors, because if I removed them everything works.

Upvotes: 0

Views: 185

Answers (1)

Pat
Pat

Reputation: 25675

To get IE to fall into line you need to write out the full selector again in the not clause:

$(".tweet:not(.tweet:first)").addClass('hidden');

In action.

Upvotes: 2

Related Questions