tags:

views:

78

answers:

1

Hi Everyone,

I am facing a problem regarding jquery Heat Color. i want to set a custom color to the all row according to a table data of that row.The is generated in run time.i set a hidden text field and comparing with this value set a particular color.i am using the code..

$("#tblreg > tbody > tr").heatcolor()//for every row of the table ......

var days = $("#DRRecvdays").val();//DRRecvdays is the id of textbox

but this returns always the 1st row value (1st row's 'DRRecvdays' text value)

please help me as soon as possible..

Thanking you..

Ashish

A: 

I believe you have multiple hidden inputs with the same id. You cannot have this and results in an invalid dom strucutre. Elements id's need to be unique.

jQuery needs a valid dom to work correctly.

Typically you would use a class on these inputs then get to the hidden input by using a sibling selector. Can you paste you markup and I can provide a solution

redsquare