Bug Tracker

Opened 10 years ago

Closed 10 years ago

#14136 closed bug (duplicate)

:target selector does not work with .ready in Chrome

Reported by: [email protected] 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

Result: 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="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
		$(function() {

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

Change History (2)

comment:1 Changed 10 years ago by anonymous

duplicate 14135

comment:2 Changed 10 years ago by Rick Waldron

Resolution: duplicate
Status: newclosed

Duplicate of #14135.

Note: See TracTickets for help on using tickets.