JQuery

1个成员

jquery给标题增加常用的效果

发表于 2016-12-24 2651 次查看

jquery给标题增加常用的效果
<!doctype html public "-//w3c//dtd xhtml 1.0 strict//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>dom manipulation</title>
<script language="网页特效" src="/jquery-1.5.2.min.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
//$('div.chapter a').attr({'rel':'external'});
$('div.chapter a').each(function(index){
var $linkthis=$(this)
$linkthis.attr({
'rel':'external',
'id':'wikilink-'+index,
'title':'你好,现在在试验'+$linkthis.text()
});
});
$('#wikilink-1').css教程('fontsize',33);
});
</script>
</head>
<body>
<!-- begin example -->
<h1 id="f-title">flatland: a romance of many dimensions</h1>
<div id="f-author">by edwin a. abbott</div>
<h2>part 1, section 3</h2>
<h3 id="f-subtitle">concerning the inhabitants of flatland</h3>
<div id="excerpt">an excerpt</div>
<div class="chapter">
<p class="square">our professional men and gentlemen are squares (to which class i myself belong) and five-sided figures or <a href="http://en.wikipedia.org/wiki/pentagon">pentagons</a>.</p>
<p class="nobility hexagon">next above these come the nobility, of whom there are several degrees, beginning at six-sided figures, or <a href="http://en.wikipedia.org/wiki/hexagon">hexagons</a>, and from thence rising in the number of their sides till they receive the honourable title of <a href="http://en.wikipedia.org/wiki/polygon">polygonal</a>, or many-sided. finally when the number of the sides becomes so numerous, and the sides themselves so small, that the figure cannot be distinguished from a <a href="http://en.wikipedia.org/wiki/circle">circle</a>, he is included in the circular or priestly order; and this is the highest class of all.</p>
<p><span class="pull-quote">it is a law of nature <span class="drop">with us</span> that a male child shall have <strong>one more side</strong> than his father</span>, so that each generation shall rise (as a rule) one step in the scale of development and nobility. thus the son of a square is a pentagon; the son of a pentagon, a hexagon; and so on.</p>
</div>
</body>
</html>

发表回复
你还没有登录,请先登录注册