use .prop() instead of .attr()
This does not work in firefox.
$( 'option[value="myVal"]' ).attr( 'selected', 'selected' );
use this one
$( 'option[value="myVal"]' ).prop( 'selected', 'selected' );
In other way
$( this ).prop( 'selected', 'selected' );