1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-28 12:30:42 +02:00

[ticket/12342] Use prop() instead of attr() for boolean properties

PHPBB3-12342
This commit is contained in:
Matt Friedman
2014-04-01 17:58:56 -07:00
parent 5a3d4109bb
commit 0f3e6ca676
4 changed files with 5 additions and 5 deletions

View File

@@ -431,14 +431,14 @@ phpbb.timezoneSwitchDate = function(keepSelection) {
if ($("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option").size() === 1) {
// If there is only one timezone for the selected date, we just select that automatically.
$("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option:first").attr('selected', true);
$("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option:first").prop('selected', true);
keepSelection = true;
}
if (typeof keepSelection !== 'undefined' && !keepSelection) {
var timezoneOptions = $('#timezone > optgroup option');
if (timezoneOptions.filter(':selected').length <= 0) {
timezoneOptions.filter(':first').attr('selected', true);
timezoneOptions.filter(':first').prop('selected', true);
}
}
};