children() - how to use properly?

children() - how to use properly?

Hi,

I've come up a bit of a blank on this one. The below works:

  1.                         $('a.want_rec').each(function() {
  2.                            
  3.                             if ($(this).attr('rel') == this_user_id) {
  4.                                 $(this).removeClass("do_follow");
  5.                                 $(this).removeClass("btn-warning");
  6.                                
  7.                                 $(this).addClass("remove_following"); // make sure we do this so we can now remove them if we want!
  8.                                 $(this).addClass("btn-danger");                                   
  9.                                
  10.                                 $(this).siblings().removeClass("icon-minus").addClass("icon-plus");
  11.                                
  12.                             }
  13.                            
  14.                          });   

With the exception of:

  1. $(this).siblings().removeClass("icon-minus").addClass("icon-plus");

The HTML structure is:

  1. <a href="#" class="want_rec" rel="1234">
  2.    <b class="icon-minus icon-2x"></b>
  3. </a>

What I need to do, is loop through each of those elements, and replace them with the icon-plus class. I've tried a few variations:

  1. $(this).siblings('b').removeClass("icon-minus").addClass("icon-plus");
  2. $(this).children().removeClass("icon-minus").addClass("icon-plus");

Yet none of them seem to work. Anyone got any ideas? I'm banging my head against the wall on this one!

TIA

Andy