I have some divs with same .hour_slots_available named class. and also contained some disabled divs with .hour_slots_disabled named class which are change with response from database.
Now I want to change these .hour_slots_available divs with .slot_activated class when I click.
But when I click these .hour_slots_available divs then its changed with .slot_activated but also changed those disabled divs with selected divs
Here is html code
<li><div id="12_01" class="hour_slots_available" ><span class="hour_tag">12:00 - 01:00</span></div></li>
<li><div class="hour_slots_available" id="01_02"><span class="hour_tag">01:00 - 02:00</span></div></li>
<li><div class="hour_slots_available" id="02_03"><span class="hour_tag">02:00 - 03:00</span></div></li>
<li><div class="hour_slots_available" id="03_04"><span class="hour_tag">03:00 - 04:00</span></div></li>
<li><div class="hour_slots_available" id="04_05"><span class="hour_tag">04:00 - 05:00</span></div></li>
and here is my jquery code
$(".hour_slots_available").click(function () {
$(this).toggleClass("slot_activated");
});
here is image of output
please guide me where i'm wrong..!