Is there a jQuery selector to replace :contains with a more definitive indexOf, for example? I am trying to match for variable VALUE_XYZ
The problem is that the code finds strings that are similar (because it contains the string) before it gets to the value that is exact.
var value= $("select[name=BU_CT_NUM_DOC]").find('option:contains($VALUE_XYZ)').val();
The entire code looks like this and is encapsulated by xslt:
<xsl:when test="/Root/Form/EDIT_BU_TYPE = 'd' or /Root/Form/EDIT_BU_NOTIFICATION_TYPE='d'"><![CDATA[
var value = $("select[name=BU_CT_NUM_DOC]").find('option:contains($VALUE_XYZ)').val();
$("#BU_CT_NUM_DOC").val(value).attr('selected',true).trigger("chosen:updated");
]]></xsl:when>
Thanks!