special characters in id of html tags
Instead of trying for ID using #, try this to match attribute like this,
$('[id=ID]')
or
$('[id='+ID+']')
so instead of
bidID = "#" + idVal + "bid"
you can try
bidID = "[id=" + idVal + "bid]"
Try escaping it:
$('#abc\\@def.com').val();
First paragraph of http://api.jquery.com/category/selectors/
It looks like JQuery has a useful method for this as of version 3 called escapeSelector
.
$('#' + $.escapeSelector(my_id_with_special_chars));
https://api.jquery.com/jQuery.escapeSelector/