Commit: 20b5e07aba14e0f2919be28c584fa5e3046eee1b Author: Hannes Magnusson <[email protected]> Wed, 4 Dec 2013 17:00:22 -0800 Parents: 786f68141729597122f7f55e64232394497dca29 Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=20b5e07aba14e0f2919be28c584fa5e3046eee1b 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>"); -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
