i am have a table and there are some data in tables, and i have a refresh button in the last column of every row.
what i want is when i click some refresh button in some
use this
reference
$("button").click(function(){
$(this).parents('tr').find(".b1").load("content.txt");
$(this).parents('tr').find(".b2").load("content1.txt");
});
or
$("button").click(function(){
$(this).parent().siblings(".b1").load("content.txt");
$(this).parent().siblings(".b2").load("content1.txt");
});
$(".b1")
and $(".b2")
are selecting every element with that class. You need to filter based on the row the button is in using something like this:
$("button").click(function(){
var $row = $(this).closest("tr");
$row.find(".b1").load("content.txt");
$row.find(".b2").load("content1.txt");
});