Skip to content
Browse files

improve agenda city links

  • Loading branch information...
1 parent 6930005 commit a2559e2302bad3c84a021e32fede287751ae21d5 @digitaltom digitaltom committed Mar 19, 2013
Showing with 8 additions and 23 deletions.
  1. +5 −5 index.html
  2. +3 −18 js/hackweek.js
View
10 index.html
@@ -148,11 +148,11 @@
<div id="agenda" class="">
<div id="agenda-offices">
- <span id="agenda-nuremberg-link">Nuremberg</span>
- <span id="agenda-provo-link">Provo</span>
- <span id="agenda-prague-link">Prague</span>
- <span id="agenda-beijing-link">Beijing</span>
- <span id="agenda-taipei-link">Taipei</span>
+ <span id="agenda-nuremberg-link" class="agenda-city-link">Nuremberg</span>
+ <span id="agenda-provo-link" class="agenda-city-link">Provo</span>
+ <span id="agenda-prague-link" class="agenda-city-link">Prague</span>
+ <span id="agenda-beijing-link" class="agenda-city-link">Beijing</span>
+ <span id="agenda-taipei-link" class="agenda-city-link">Taipei</span>
</div>
<div id="agenda-year">
View
21 js/hackweek.js
@@ -101,25 +101,10 @@ $(function () {
}, 800);
})
- $("#agenda-nuremberg-link").click(function (event) {
+ $(".agenda-city-link").click(function (event) {
event.stopPropagation()
- set_agenda_location('nuremberg')
- })
- $("#agenda-provo-link").click(function (event) {
- event.stopPropagation()
- set_agenda_location('provo')
- })
- $("#agenda-prague-link").click(function (event) {
- event.stopPropagation()
- set_agenda_location('prague')
- })
- $("#agenda-beijing-link").click(function (event) {
- event.stopPropagation()
- set_agenda_location('beijing')
- })
- $("#agenda-taipei-link").click(function (event) {
- event.stopPropagation()
- set_agenda_location('taipei')
+ var city = $(this).attr('id').replace("agenda-", "").replace("-link", "")
+ set_agenda_location(city)
})
if ($.cookie("agenda-location")) {

0 comments on commit a2559e2

Please sign in to comment.
Something went wrong with that request. Please try again.