这就是我所拥有的,当我单击链接时它不起作用。
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>The Conceited Cat | a Modest Mouse fansite</title>
<link href="css/normalize.css" rel="stylesheet" type="text/css">
<link href="style.css" rel="stylesheet" type="text/css">
<link href="css/jquery.socialist.css" rel="stylesheet" type="text/css">
<script src="js/jquery-1.8.1.js" type="text/javascript"></script>
<script src="js/jquery.socialist.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
$('nav a').click(function() {
var social = $(this).attr('title');
var artist = $(this).attr('rel');
return false;
})
});
</script>
</head>
<body>
<div id="wrapper">
<h1>THE CONCEITED CAT</h1>
<h3>a Modest Mouse fansite</h3>
<nav>
<ul>
<li>
<a href=
"http://www.youtube.com/channel/UCIJdJU2RCaOieKNh7vCxWCA"
rel="UCIJdJU2RCaOieKNh7vCxWCA" title="youtube">modest
mouse</a>
</li>
</ul>
</nav>
<div id="socialistContainer"></div><script type="text/javascript">
$("#socialistContainer").socialist({
networks: [
{ name: social , id: artist }
]
});
</script>
</div>
</body>
</html>
如果我手动输入名称:'youtube',id:'UCIJdJU2RCaOieKNh7vCxWCA',它会很好用,但需要它与链接一起使用。任何帮助将不胜感激。谢谢,粘土