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
G
g1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
76
Issues
76
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
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
cto
g1
Commits
5b3351dc
Commit
5b3351dc
authored
Mar 06, 2019
by
S Anand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DOC: revise order of urlchange invocation
parent
193f8778
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
docs/urlchange.md
docs/urlchange.md
+3
-3
No files found.
docs/urlchange.md
View file @
5b3351dc
...
...
@@ -7,7 +7,7 @@ Suppose we have buttons that sort based on "City" or "Sales". These are usually
bound directly to DOM events like this:
```
html
<!-- DO NOT DO THIS -- this example shows
what should NOT be don
e -->
<!-- DO NOT DO THIS -- this example shows
a BAD practic
e -->
<button
class=
"sort"
>
City
</button>
<button
class=
"sort"
>
Sales
</button>
<script>
...
...
@@ -32,8 +32,8 @@ Now, changes in the URL should trigger actions:
```
js
$
(
window
)
.
urlchange
()
// URL changes trigger '#?city'
events
.
on
(
'
#?city
'
,
function
(
e
,
city
)
{
action
(
city
)
})
.
on
(
'
#?city
'
,
function
(
e
,
city
)
{
action
(
city
)
})
// Listen to #?
events
.
urlchange
()
// Enable these events
```
Examples:
...
...
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