Last active
August 29, 2015 14:27
-
-
Save ChrisMoney/fb959c14f4d0b4246929 to your computer and use it in GitHub Desktop.
JQuery - Get table row and cell without ID. For table use table ID, for grid use grid ID
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
| <script type="text/javascript"> | |
| $(document).ready(function () { | |
| // uwg is a grid ID. | |
| // always use closest when selecting a specific row | |
| $('[id$=uwgAssignedQualifyingEvents]').delegate("tr", "click", function(e) { | |
| var lostEligibility = $(this).closest('tr').find('td:eq(6)').text(); | |
| if (lostEligibility.length > 1) { | |
| //alert(lostEligibility); | |
| $('[id$=btnAddToTournament]').prop("disabled", true); | |
| $('[id$=btnReQualifyToTournament]').prop("disabled", true); | |
| $('[id$=btnRemoveFromTournament]').prop('disabled', true); | |
| } | |
| else { | |
| $('[id$=btnAddToTournament]').removeAttr('disabled'); | |
| $('[id$=btnReQualifyToTournament]').removeAttr('disabled'); | |
| $('[id$=btnRemoveFromTournament]').removeAttr('disabled'); | |
| } | |
| }); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment