Получите часть названия класса от родителей и обратитесь к Child jQueryJquery

Программирование на jquery
Anonymous
Получите часть названия класса от родителей и обратитесь к Child jQuery

Сообщение Anonymous »

У меня есть следующее html :

Код: Выделить всё

 Wire Type:

Select wire..
14/2
14/4
16/4
16/2
RG6
CAT5
RG59
LVT
CAT6
HDMI
Shielded CAT6
 
Length:

Retail Price:
 

 

I want to make sure that input - id_wire_length and id_wire_retail are related to their parent tr this can be proven due to the part-id which is in this example the number 6 in wiring_details and in id_wire_length and id_wire_retail .
js , что у меня есть:

Код: Выделить всё

$('input[class^="id_wire_retail"]').each(function() {
parts_cents_total += (Money.dollars_to_cents($(this).val()) * $('input[class^="id_wire_length"]').val());
});
выше соответствует части ID_WIRE_DETAIL , а также ID_WIRE_LENGHT - но как я могу убедиться, что это то, что связано с его родителем,
, так что я думаю, что это сводится к этому:
в них?

Подробнее здесь: https://stackoverflow.com/questions/529 ... ild-jquery

Вернуться в «Jquery»