Skip to content

Instantly share code, notes, and snippets.

@chrisinajar
Created May 25, 2012 20:21
Show Gist options
  • Save chrisinajar/2790356 to your computer and use it in GitHub Desktop.
Save chrisinajar/2790356 to your computer and use it in GitHub Desktop.
park_trip_button_bind: function(park_id){
if (typeOf(park_id) == 'array'){
for (var i in park_id) (function(i) {
$("#tripadd_"+park_id[i]).bind('click',function(){
bp.add_remove_park_trip(park_id[i]);
});
})(i);
} else {
$("#tripadd_"+park_id).bind('click',function(){
bp.add_remove_park_trip(park_id);
});
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment