Button is hidden after upgrading from 1.7 to 1.11
I was using jQuery 1.7 and upgraded to 1.11 and also added jquery-migrate-1.2.1
After upgrading there is a button on the page that no longer displays. I can see it for an instant when the page loads, then it disappers.
This is the button in my cshtml file
- <input type="button" class="check" value="check all" />
This is renedered to the browser
- <input type="button" class="check" value="check all" style="display: none;">
This is the only code that uses the button and it's in the document.ready function. All it does is toggle the checkboxes on the page.
- $('.check:button').toggle(function () {
- $('input:checkbox').attr('checked', 'checked');
- $(this).val('uncheck all');
- }, function () {
- $('input:checkbox').removeAttr('checked');
- $(this).val('check all');
- });
Edit: I've done some testing and determined that if i comment out the toggle code the button does appear, so it must be something with that part of the code.