Skip to main content

Bug Tracker

Side navigation

#14136 closed bug (duplicate)

Opened July 15, 2013 07:40PM UTC

Closed July 15, 2013 07:46PM UTC

:target selector does not work with .ready in Chrome

Reported by: Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:

Create following HTML file. Open it in Chrome and any other browser and append hashtag #foo to the file name


In Chrome, text will be blue (no class appended to #foo)

In other browsers it will be red (#foo has class bar)

		.bar {
			color: red !important;
		:target {
			color: blue;
	<div id="foo">Hello, world</div>
	<script src=""></script>
		$(function() {

When executed from console, $(":target").addClass("bar") works

Attachments (0)
Change History (2)

Changed July 15, 2013 07:42PM UTC by anonymous comment:1

duplicate 14135

Changed July 15, 2013 07:46PM UTC by rwaldron comment:2

resolution: → duplicate
status: newclosed

Duplicate of #14135.