خرید بک لینک

Vote count: 0

When i click on a button, i want to remove a class and replace with by other one. I have the following html content :

<div class="mainDiv-34">
   <div class="row one red"></div>
   <div class="row two red"></div>
   <div class="row three red"></div>
 </div>

What i want to do is to replace the class="row two red" by class="row two green", but the row two green is addded next to my mainDiv-34 instead ! Why ?

Here's my JS :

$('.mainDiv-34').removeClass("row two red").addClass("row two green");

Thanks

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 21 فروردين 1395 ساعت: 2:58

صفحه بندی