Last active
April 23, 2020 14:05
-
-
Save staycreativedesign/f8edf94c91b64c0a489b04558beda72d 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta name="generator" content= | |
"HTML Tidy for Linux (vers 25 March 2009), see www.w3.org" /> | |
<title></title> | |
</head> | |
<body> | |
<table class="mt-10"> | |
<tbody> | |
<tr> | |
<th>Product Description</th> | |
<th>Qty</th> | |
<th>Action</th> | |
</tr> | |
<tr data-uid="1"> | |
<td><input type="text" name="product_option_title-REQ" id="product_option_title" | |
value="this is the description" maxlength="200" class="short" /></td> | |
<td><input type="text" name="option_qty-REQ" id="option_qty" value="10" | |
maxlength="200" class="short" /></td> | |
<td><span class="update_product">Update</span></td> | |
</tr> | |
<tr data-uid="4"> | |
<td><input type="text" name="product_option_title-REQ" id="product_option_title" | |
value="hey james" maxlength="200" class="short" /></td> | |
<td><input type="text" name="option_qty-REQ" id="option_qty" value="1" maxlength= | |
"200" class="short" /></td> | |
<td><span class="update_product">Update</span></td> | |
</tr> | |
<tr data-uid="5"> | |
<td><input type="text" name="product_option_title-REQ" id="product_option_title" | |
value="dasdasaas" maxlength="200" class="short" /></td> | |
<td><input type="text" name="option_qty-REQ" id="option_qty" value="43223" | |
maxlength="200" class="short" /></td> | |
<td><span class="update_product">Update</span></td> | |
</tr> | |
</tbody> | |
</table> | |
</body> | |
</html> | |
$(document).ready(function() { | |
$('.update_product').live('click', function() { | |
console.log($(this).parent('td').parent('tr').data('uid')) | |
}); | |
}); |
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).ready(function() { | |
$('.update_product').live('click', function() { | |
console.log($(this).parent('td').parent('tr').data('uid')) | |
console.log($(this).parent('td').prev('').html()) | |
// trying to to get #option_qty.val() | |
}); | |
}); | |
trying to get the input value of |
nilbus
commented
Apr 23, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment