HTML validation: Rename custom on-page attribute to data-on-page.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg 2018-07-06 17:19:15 -04:00 committed by Tim Abbott
parent 37dfa7f7d4
commit ecb4fd2193
2 changed files with 7 additions and 7 deletions

View File

@ -204,7 +204,7 @@ var events = function () {
// pop the last element to get the current section (eg. `features`). // pop the last element to get the current section (eg. `features`).
var location = window.location.pathname.replace(/\/#*$/, "").split(/\//).pop(); var location = window.location.pathname.replace(/\/#*$/, "").split(/\//).pop();
$("[on-page='" + location + "']").addClass("active"); $("[data-on-page='" + location + "']").addClass("active");
$("body").click(function (e) { $("body").click(function (e) {
var $e = $(e.target); var $e = $(e.target);

View File

@ -11,22 +11,22 @@
</a> </a>
<ul> <ul>
<div class="exit">&times;</div> <div class="exit">&times;</div>
<li on-page="hello"> <li data-on-page="hello">
<a href="/hello/">Home</a> <a href="/hello/">Home</a>
</li> </li>
<li on-page="features"> <li data-on-page="features">
<a href="/features/">Features</a> <a href="/features/">Features</a>
</li> </li>
<li on-page="plans"> <li data-on-page="plans">
<a href="/plans/">Plans</a> <a href="/plans/">Plans</a>
</li> </li>
<li on-page="apps"> <li data-on-page="apps">
<a href="{{ apps_page_url }}">Apps</a> <a href="{{ apps_page_url }}">Apps</a>
</li> </li>
<li on-page="integrations"> <li data-on-page="integrations">
<a href="/integrations/">Integrations</a> <a href="/integrations/">Integrations</a>
</li> </li>
<li on-page="why-zulip"> <li data-on-page="why-zulip">
<a href="/why-zulip/">Why Zulip</a> <a href="/why-zulip/">Why Zulip</a>
</li> </li>
{% if user_is_authenticated %} {% if user_is_authenticated %}