Commit 5b3351dc authored by S Anand's avatar S Anand

DOC: revise order of urlchange invocation

parent 193f8778
......@@ -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 done -->
<!-- DO NOT DO THIS -- this example shows a BAD practice -->
<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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment