1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
---|
2 | |
---|
3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
4 | <head> |
---|
5 | <title>Style Attribute Selector Problem</title> |
---|
6 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
---|
7 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> |
---|
8 | <script type="text/javascript"> |
---|
9 | function blink(jqueryElement) |
---|
10 | { |
---|
11 | jqueryElement.fadeOut().fadeIn(); |
---|
12 | } |
---|
13 | </script> |
---|
14 | </head> |
---|
15 | <body> |
---|
16 | <p id="first" class="firstClass" style="color: red"><p id="first" class="firstClass" style="clor: red"></p> |
---|
17 | <p id="second" class="secondClass" style="color: green"><p id="second" class="secondClass" style="color: blue"></p></p> |
---|
18 | <p id="third"><p id="third"></p></p> |
---|
19 | <ul> |
---|
20 | <li><a href="javascript:blink($('p[class]'))">$('p[class]')</a></li> |
---|
21 | <li><a href="javascript:blink($('p[class*=second]'))">$('p[class*=second]'))</a></li> |
---|
22 | <li><a href="javascript:blink($('p[style]'))">$('p[style]'))</a></li> |
---|
23 | <li><a href="javascript:blink($('p[style*=red]'))">$('p[style*=red]')</a></li> |
---|
24 | </ul> |
---|
25 | </body> |
---|
26 | </html> |
---|