Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-ausstellung-virtuell.de
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ubezi
web-ausstellung-virtuell.de
Commits
ff0121db
Commit
ff0121db
authored
Mar 22, 2018
by
Jonas Heinrich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start implementing popstate event
parent
204addb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
js/main.js
js/main.js
+4
-8
No files found.
js/main.js
View file @
ff0121db
...
...
@@ -18,8 +18,6 @@ $('body').on('click','.btn, .nav-item, logo, .video-item', function(e) {
url
=
$this
.
attr
(
"
href
"
);
}
alert
(
url
);
load_page
(
url
);
return
false
;
...
...
@@ -27,14 +25,12 @@ $('body').on('click','.btn, .nav-item, logo, .video-item', function(e) {
});
function
load_page
(
url
)
{
$
(
"
content
"
).
empty
();
$
(
"
content
"
).
hide
().
load
(
url
).
fadeIn
(
'
fast
'
);
//window.history.pushState({href: url}
, '', url);
window
.
history
.
pushState
(
''
,
''
,
url
);
}
window
.
addEventListener
(
'
popstate
'
,
function
(
e
){
if
(
e
.
state
)
load_page
(
e
.
state
.
href
);
});
window
.
onpopstate
=
function
(
event
)
{
load_page
(
location
.
pathname
);
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment