Skip to main content

Bug Tracker

Side navigation

#6140 closed bug (invalid)

Opened February 21, 2010 03:36PM UTC

Closed February 26, 2010 05:48PM UTC

jQuery removeClass bug?

Reported by: Leur Owned by:
Priority: Milestone: 1.4.2
Component: unfiled Version: 1.4.1
Keywords: Cc:
Blocked by: Blocking:
Description

In this example I try removing the class of bake and adding the class of cake. However when cake is added, $(".bake") takes the action of what should have been just $("cake").

var bake=0;

$(document).ready(function() {

$(".bake").click(function() {

$(this).html("Clicks: " + ++bake);

$(this).removeClass('bake');

$(this).addClass('cake');

});

});

Attachments (0)
Change History (1)

Changed February 26, 2010 05:48PM UTC by john comment:1

resolution: → invalid
status: newclosed

Do you have a larger example? I'm not seeing the issue here.