Skip to content

Instantly share code, notes, and snippets.

@onedesign
Created August 17, 2009 23:23
Show Gist options
  • Save onedesign/169443 to your computer and use it in GitHub Desktop.
Save onedesign/169443 to your computer and use it in GitHub Desktop.

Revisions

  1. onedesign revised this gist Aug 17, 2009. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,8 @@
    $("#add_to_team").live("click", function() {
    var player_href = $(this).attr('href')
    var player_slug = player_href.substring(player_href.search(/[a-z]+-[a-z]+$/));
    $.post('/fantasy_team_players', {id: player_slug});
    $.post('/fantasy_team_players', {id: player_slug}, function(data) {
    success: $("#add_to_team").html("added to your team")
    }, "json");
    return false;
    });
  2. onedesign created this gist Aug 17, 2009.
    6 changes: 6 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    $("#add_to_team").live("click", function() {
    var player_href = $(this).attr('href')
    var player_slug = player_href.substring(player_href.search(/[a-z]+-[a-z]+$/));
    $.post('/fantasy_team_players', {id: player_slug});
    return false;
    });