jQuery - Setting selected text on Chrome doesn't work
Using jQuery. Setting the selected text in Chrome doesn't work.
Example:$('#selectGroup :se开发者_高级运维lected').text(name);
This code works in FF, but doesn't work in Chrome. Why?
Works for me in Chrome (6.0.472.63): http://www.jsfiddle.net/PNQFr/
Make sure you haven't got another element on the page with the same ID. Post some markup and the exact JS you're using.
Easy way to check you haven't got two element with same ID:
alert($('[id=selectGroup]').size());
I found bug. Zend FW added label for option tag. And selected text successfully changed, but Chrome show option label.
精彩评论