Last active
November 12, 2017 12:49
-
-
Save mk-pmb/0478a53be43fa41ee60567b909d9e420 to your computer and use it in GitHub Desktop.
This file contains 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
function clearRightOf(field) { | |
if (!window.confirm('Clear cells right of trigger field?')) { return; } | |
window.lastClearRightTrigger = this; | |
var right = jQuery(field).parent().nextAll(); | |
right.find('input').val(''); | |
right.find('select').prop('selectedIndex', 0); | |
window.alert('Should be cleared now, look before you then click ok.'); | |
} | |
jQuery(document).ready(function () { | |
jQuery('table#tblProducts').on('change', 'select, input.pnm', | |
function () { clearRightOf(this); }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment