Hi, I have the following code:
$("input[id$=UserField_hiddenSpanData],input[title=Title]").each(function(){
var rb = $('#ctl00_m_g_c6ae303a_6013_4adb_8057_63a214bcfd24_ctl00_ctl04_ctl07_ctl00_ctl00_ctl04_ctl00_ctl00_SelectResult option').length;
var val = $(this).val();
if(val != 0 && val.length != 0 && rb != 0) {
//add one to the counter
controlsPassed += 1;
}
});
It works fine but I don't want to have the ID hardcoded so I thought I could use
var rb = $('id$=SelectResult option').length;
but it doesn't work, what's wrong with my syntax?
Thanks in advance.