Select option attribute selector issue in Firefox
Using jQuery 1.4.1 in Firefox 3.6
I'm working in a system that automatically inserts options into certain SELECT elements. I always know the text that is being inserted, but not necessarily the value.
If I'm trying to get a certain option using the [text=] attribute, it returns null if I include the text in quotes in Firefox.
e.g.
- var myindex = $('#fielddiv select[id="mc.route.stepstatus.step9"] option[text="Work Inprocess"]').attr('index');
If I leave the quotes off of the [text=] selector, it returns the index as it should. The [id=] selector doesn't have this problem.
Either way works in IE7.