Skip to content

Instantly share code, notes, and snippets.

Created August 15, 2013 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6245719 to your computer and use it in GitHub Desktop.
Save anonymous/6245719 to your computer and use it in GitHub Desktop.
Illustrates the issue described in http://shannonwells.livejournal.com/12937.html
<select class="myselect">
<option value='foo' >foo</option>
<option value="bar" >bar</option>
<option value="baz" >baz</option>
</select>
it("shows the different browser behavior", function() {
$("select.myselect option[value=baz]").attr("selected", "selected");
jasmine.log( $("select.myselect").val() );
jasmine.log( $("select option[selected]").val();
// jasmine.log doesn't appear in the browser unless the test fails.
expect(false).toBeTruthy();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment