-1

I want to remove class with removeClass()

but there is not work

here is my code

<td ng-repeat="user in users[0].yds" data-title="'Timeline'"
    sortable="timeline" style="text-align: center">
    <i id="circle_show" class="icon-circle-blank" style="position: absolute;">
    </i>
</td>

 $('#circle_show').removeClass("icon-circle-blank");
 console.log('rm')

removeClass() have done , but the class is not remove

please help

isherwood
  • 58,414
  • 16
  • 114
  • 157
user2680731
  • 29
  • 1
  • 2
  • 10
  • If you want to removeClass from all tag then use class instead of ID. – Jay Shukla Aug 22 '13 at 05:42
  • 1
    Your question is using jquery for the removing of the class. Take a look at the angulr ng-class, for a more angular way of doing it. http://docs.angularjs.org/api/ng.directive:ngClass also with the ng-repeat you are potentially setting more than 1 element with the same ID, which you shouldn't do – Anton Aug 22 '13 at 05:46
  • if I want to add class , use class to add is not work? – user2680731 Aug 22 '13 at 05:47
  • @user2680731 Your attempt indicates you don't "get" the Angular way just way. Fear not! I recommend reading http://stackoverflow.com/questions/14994391/how-do-i-think-in-angularjs-if-i-have-a-jquery-background – Benjamin Gruenbaum Aug 22 '13 at 05:52

1 Answers1

0

Try this

<td ng-repeat="user in users[0].yds" data-title="'Timeline'" sortable="timeline"    style="text-align: center" >

<i class="circle_show icon-circle-blank" style="position: absolute;"></i>

 $('.circle_show').removeClass("icon-circle-blank");
 console.log('rm')
Tushar Gupta - curioustushar
  • 58,085
  • 24
  • 103
  • 107
Jay Shukla
  • 5,794
  • 8
  • 33
  • 63