splanton
asked on
Quick JQuery syntax issue
Hi,
I've got a line of Jquery code to find the text value of a selected item in a drop down list:
It doesn't work, however this does:
So using the '+ currentid' is causing the issue. I have confirmed the currentid has a correct value. How do I code this? I have searched the internet but it's so specific I can't find an answer that helps me.
I am assuming that you can place the '#feeid + currentId' in some parenthesis? I may be totally wrong though. :)
Regards
I've got a line of Jquery code to find the text value of a selected item in a drop down list:
var currentId = $(this).attr('id').substring(5);
if ($('#feeid + currentId option:selected').text() == 'My Fee Is') {
It doesn't work, however this does:
var currentId = $(this).attr('id').substring(5);
if ($('#feeid1 option:selected').text() == 'My Fee Is') {
So using the '+ currentid' is causing the issue. I have confirmed the currentid has a correct value. How do I code this? I have searched the internet but it's so specific I can't find an answer that helps me.
I am assuming that you can place the '#feeid + currentId' in some parenthesis? I may be totally wrong though. :)
Regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Many thanks,
Regards