mirror of https://github.com/zulip/zulip.git
HTML validation: Rename custom on-page attribute to data-on-page.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
37dfa7f7d4
commit
ecb4fd2193
|
@ -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);
|
||||||
|
|
|
@ -11,22 +11,22 @@
|
||||||
</a>
|
</a>
|
||||||
<ul>
|
<ul>
|
||||||
<div class="exit">×</div>
|
<div class="exit">×</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 %}
|
||||||
|
|
Loading…
Reference in New Issue