com web/php: Fix markup validation warning: index.php js/common.js
| From: | Hannes Magnusson | Date: | Thu, 05 Dec 2013 01:04:17 +0000 |
| Subject: | com web/php: Fix markup validation warning: index.php js/common.js | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-17376@lists.php.net to get a copy of this message | ||
Commit: 9bf1f752e731d27e7bc443cc3f0c10fabdcc8e36
Author: Hannes Magnusson <bjori@mongodb.com> Wed, 4 Dec 2013 17:00:22 -0800
Parents: 015129c59d88beffcfc527705d26a2bf4e795553
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=9bf1f752e731d27e7bc443cc3f0c10fabdcc8e36
Log:
Fix markup validation warning
The hN a[id] was used in a previous implementation of the news entries
but is no longer useful
Also removed commented out javascript that is of no value
Changed paths:
M index.php
M js/common.js
Diff:
diff --git a/index.php b/index.php
index 3b24689..7c0b106 100644
--- a/index.php
+++ b/index.php
@@ -66,7 +66,7 @@ foreach($frontpage as $entry) {
$content .= <<<NEWSENTRY
<div class="newsentry">
<div class="newstime">$date</div>
- <h3 class="newstitle"><a href="{$MYSITE}{$link}"
name="{$id}">{$entry["title"]}</a></h3>
+ <h3 class="newstitle"><a href="{$MYSITE}{$link}"
id="{$id}">{$entry["title"]}</a></h3>
<div class="newscontent">
{$entry["content"]}
</div>
diff --git a/js/common.js b/js/common.js
index eedb979..a82518b 100755
--- a/js/common.js
+++ b/js/common.js
@@ -75,27 +75,6 @@ $(document).ready(function() {
$(this).append("<a class='genanchor' href='#" +
$(this).parent().attr("id") + "'> ¶</a>");
});
- /**
- var scrollHeightOfHeadnav = - document.getElementById('head-nav').scrollHeight;
- scrollHeightOfHeadnav -= 12; //some margin
- $parameters = $refsect1.filter(".parameters").find("..term .parameter");
- $refsect1.find(".parameter").each(function () {
- var $node = $(this);
- var $nodeText = $node.text();
- if ($nodeText[0].charAt(0) === '$') {
- $nodeText = $nodeText.substring(1);
- }
- $parameters.each(function (idx, param) {
- var $param = $(param);
- if ($param.text() == $nodeText) {
- $node.click(function() {
- $.scrollTo($param, 600,
{'offset':{'top':scrollHeightOfHeadnav}});
- });
- }
- });
- });
- */
-
$('.refentry code.parameter').click(function(event)
{
var id = $(this).text().replace(/^[&$]{0,2}/g, '');
@@ -103,11 +82,6 @@ $(document).ready(function() {
$.scrollTo({top: offsetTop, left: 0}, 400);
});
- var $headingsWithIds = $('h1 a[id], h2 a[id], h3 a[id], h4 a[id]');
- $headingsWithIds.each(function(){
- var $this = $(this);
- $this.after("<a class='genanchor' href='#" +
$this.attr('id') + "'> ¶</a>")
- });
$('h1[id], h2[id], h3[id], h4[id]').each(function() {
var $this = $(this);
$this.append("<a class='genanchor' href='#" +
$this.attr('id') + "'> ¶</a>");