Skip to content

Commit

Permalink
Use jQuery ready
Browse files Browse the repository at this point in the history
window.onload will overwrite and isn't really the best place since it
doesn't take into account when the DOM is ready. We have jQuery so use
it to initialize correctly.
  • Loading branch information
sukima committed Nov 8, 2015
1 parent 8a00164 commit aa238b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions _includes/developers_cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
//assume Mustache is loaded
//assume Meetup is loaded

window.onload = function(){
$(function(){
var getPaginatorLinks = function(results) {
var current_page = document.location.search.match(/page=(\d+)/);
current_page = current_page == null ? 1 : parseInt(current_page[1]);
Expand Down Expand Up @@ -151,5 +151,5 @@

return dev;
}
}
});
</script>
4 changes: 2 additions & 2 deletions _includes/meetup_cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//assume Mustache is loaded
//assume Meetup is loaded

window.onload = function(){
$(function(){
var MAX_EVENTS = 5;

var EVENTS_URL = 'https://api.meetup.com/2/events?' +
Expand Down Expand Up @@ -87,5 +87,5 @@
event.formattedDate = formatDate(new Date(event.time));
return event;
}
}
});
</script>

0 comments on commit aa238b4

Please sign in to comment.