Created
March 6, 2017 19:09
-
-
Save mfifth/8af1465fb8abdcbad2f6573f38ac91b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).on('submit','#weekly-pitch-count',function(e){ | |
| $('.processing-reports-wrapper').show(); | |
| var data = $('#weekly-pitch-count').serialize(); | |
| $.ajax({ | |
| data: data, | |
| type: 'post', | |
| url: '/app-dashboard/get-pitch-count', | |
| success: function(data){ | |
| // console.log('profile here'); | |
| console.log(data); | |
| var total_pitches = 0; | |
| $.each(data, function(i, item) { | |
| console.log(item) | |
| total_pitches = total_pitches + item.total_pitches; | |
| }); | |
| get_county_by_type('Game'); | |
| get_county_by_type('Warm Up'); | |
| get_county_by_type('Lesson'); | |
| get_county_by_type('Practice'); | |
| get_county_by_type('Workout'); | |
| $('.weekly-pitch-count').html(total_pitches + ' pitches'); | |
| $("") | |
| } | |
| }); | |
| return e.preventDefault(); | |
| //return false; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var data = "pitcher_id=96&start_date=08%2F23%2F16&user_id=" | |
| // This is the variable on line 3. I need to create a link with that data which looks kinda like this. | |
| // /shares/share_content/pitch-tracker-widget/{data.pitcher_id}/{data.start_date} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment