// Enable image controls $('.image-control').each(function() { $(this) .imageControl() .on('uploadProgress.imageControl', (event, percent) => NProgress.set(percent * .9)) .on('uploadComplete.imageControl', () => NProgress.done(false)); });
$(this.options.parent) .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') .each($.proxy(function (i, element) { var $element = $(element) this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) }, this)) .end()
$(submitForm).add(this.$('#imageForm')).find(':invalid, .invalid').each(function() { var inputName, $label; inputName = (($label = self.$("label[for='"+$(this).attr('id')+"']")).length && $label.text()) || $(this).attr('data-label') || $(this).attr('id'); invalidInputList.push(inputName.trim()); });
// AFFIX DATA-API // ============== $(window).on('load', function () { $('[data-spy="affix"]').each(function () { var $spy = $(this) var data = $spy.data() data.offset = data.offset || {} if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom if (data.offsetTop != null) data.offset.top = data.offsetTop Plugin.call($spy, data) }) })
// responsible for converting path of array of files to local system's path. function ToLocalURL(files, callback) { if (files != null) { $(files).each(function (i, file) { file = encodeURI('file:/' + file); }); callback(files); } else { callback([]); // returning empty array so that app won't crash because of null (error prevention module is pending). } }
function submitForm() { $('#maps_search input').each(function () { const input = $(this); if (input.val() === "") { input.prop('disabled', true); } }); $('form').submit(); }
// SCROLLSPY DATA-API // ================== $(window).on('load.bs.scrollspy.data-api', function () { $('[data-spy="scroll"]').each(function () { var $spy = $(this) Plugin.call($spy, $spy.data()) }) })
$('.wow').each(function() { $(this).css({ 'visibility': 'hidden' }); animationName[$(this).index('.wow')] = $(this).css('animation-name'); $(this).css({ 'animation-name': 'none' }); });
// Hides the autocomplete control function hideAutocomplete(items) { items = items || '[data-autocomplete]'; $(items).each(function() { $(this).typeahead('close'); }); }
$(window).on('load', function () { $('[data-ride="carousel"]').each(function () { var $carousel = $(this) Plugin.call($carousel, $carousel.data()) }) })
// SCROLLSPY DATA-API // ================== $(window).on('load.bs.scrollspy.data-api', function () { $('[data-spy="scroll"]').each(function () { var $spy = $(this) Plugin.call($spy, $spy.data()) }) })
$(this.options.parent) .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') .each($.proxy(function (i, element) { var $element = $(element) this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) }, this)) .end()
// Destroys the autocomplete control function disableAutocomplete(items) { items = items || '[data-autocomplete]'; $(items).each(function() { $(this).typeahead('destroy'); }); }
// AFFIX DATA-API // ============== $(window).on('load', function () { $('[data-spy="affix"]').each(function () { var $spy = $(this) var data = $spy.data() data.offset = data.offset || {} if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom if (data.offsetTop != null) data.offset.top = data.offsetTop Plugin.call($spy, data) }) })
$(window).on('load', function () { $('[data-ride="carousel"]').each(function () { var $carousel = $(this) Plugin.call($carousel, $carousel.data()) }) })