jellyfin-web/dashboard-ui/legacy/fnchecked.js

15 lines
456 B
JavaScript
Raw Normal View History

2016-08-20 11:34:30 -07:00
define(['jQuery'], function ($) {
// TODO: This needs to be deprecated, but it's used heavily
$.fn.checked = function (value) {
if (value === true || value === false) {
// Set the value of the checkbox
return $(this).each(function () {
this.checked = value;
});
} else {
// Return check state
return this.length && this[0].checked;
}
};
});