Original Post
html:
css:
jquery:
It's supposed to popup an alert saying that two links are selected. But it always says 0.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><link rel ="Stylesheet" href="styles/mycss.css" type="text/css"/></head><body><script type="text/javascript" src="scripts/jquery-1.4.2.js"></script><script type="text/javascript" src="scripts/myjs.js"></script><h3> The compound style here </h3><h3> The compound style here2 </h3></body></html>css:
@charset "utf-8";/* CSS Document */.one { font-size: 16px; font-style: italic; color: #0C9;}h3 A:link { font-size: 36px; color: #F00; text-decoration:none;}jquery:
// JavaScript Document$(document).ready(function() {alert($('h3 A:link').length + 'elements');});It's supposed to popup an alert saying that two links are selected. But it always says 0.