Skip to content

Instantly share code, notes, and snippets.

@jsakamoto
Created September 19, 2012 03:30
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 jsakamoto/3747510 to your computer and use it in GitHub Desktop.
Save jsakamoto/3747510 to your computer and use it in GitHub Desktop.
test('initial state of text box is disabled.', function(){
$('#qunit-fixture').append(
"<input type='checkbox' id='cb1' name='cb1' "+
" data-toggle-target='#tb1' value='on'/>"+
"<input type='text' id='tb1' name='tb1' value=''/>");
$('#cb1').disabledIfCheckOff();
Qunit.equal($('#cb1').prop('checked'), false);
Qunit.equal($('#tb1').prop('disabled'), true);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment