mirror of
https://github.com/scratchfoundation/scratchx.git
synced 2025-02-17 19:30:20 -05:00
Unredundantize static link method
This commit is contained in:
parent
06e031cdc8
commit
15daacc8e9
2 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,7 @@
|
|||
<main>
|
||||
<header>
|
||||
<div>
|
||||
<a href="#home" data-staticlink="home"><h1 class="scratchx-logo"><span>ScratchX</span></h1></a>
|
||||
<a href="#home" data-action="static-link"><h1 class="scratchx-logo"><span>ScratchX</span></h1></a>
|
||||
<nav class="main-nav">
|
||||
Related Sites:
|
||||
<ul>
|
||||
|
@ -172,7 +172,7 @@
|
|||
<h2>ScratchX</h2>
|
||||
<ul>
|
||||
<li><a href="">Terms of Service</a></li>
|
||||
<li><a href="#privacy-policy" data-staticlink="privacy-policy">Privacy Policy</a></li>
|
||||
<li><a href="#privacy-policy" data-action="static-link">Privacy Policy</a></li>
|
||||
<li><a href="">Contact Us</a></li>
|
||||
<li><a href="">FAQ</a></li>
|
||||
<li><a href="">Forums</a></li>
|
||||
|
|
|
@ -170,9 +170,9 @@ function loadFromURLParameter() {
|
|||
|
||||
/* Page switching */
|
||||
|
||||
$("[data-staticlink]").click(function(e) {
|
||||
$("[data-action='static-link']").click(function(e) {
|
||||
e.preventDefault();
|
||||
var path = $(this).attr("data-staticlink");
|
||||
var path = $(this).attr("href").substring(1);
|
||||
showPage(path);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue