- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Jquery click CSS problem…in Chrome only?
Well this is just infuriating.
http://keithpickering.net/site-designs/#comments
I’m working on some styles for featured and buried comments. Click the buried comment and the “buried” class is removed, like this:
$(document.body).on(‘click’, ‘.buried’, function() {
$(this).removeClass(‘buried’);
});
It works, but in Chrome and Chrome alone, the columns act all weird after the “buried” class is removed. Check it out in Chrome to see what I mean.
If you go into the style editor and uncheck+recheck literally ANY style, it will work as expected.
I’m pretty stumped with this.
Absolutely no problem on Chrome Canary. It works like a charm.
Why not;
$(‘.buried’).on(‘click’, function() {
$(this).removeClass(‘buried’);
}
Or Zoidberg.
That’s what I tried to begin with, but it doesn’t work for some reason
I think I fixed it by adding “white-space: nowrap” to the comment module.
But I’m still curious as to why this was actually happening.
EDIT: Seems it also works when I get rid of the “border: 0” declaration on the “buried” module and instead set the border-color to the same as the background.
I’m not getting any errors in firebug, although I was testing some stuff a minute ago so that might be why you got an error.
Another reason why I need to figure out a way to work on my site offline, but I have no idea how without manually downloading and re-uploading it every time I want to change something :P