1$(document).ready(() => { 2 $('.tag-label').hover( 3 function () { 4 $(this).addClass('label-primary') 5 $(this).removeClass('label-info') 6 }, 7 function () { 8 if (!$(this).hasClass('label-active')) { 9 $(this).addClass('label-info') 10 $(this).removeClass('label-primary') 11 } 12 }, 13 ) 14 15 // nuage de mots clés : tooltip 16 $('.tag-link').popover({ html: true, placement: 'top', trigger: 'click' }) 17 $('.nuage').on('click', '.btn-close-popover', function () { 18 $(this).parents('.popover').prev('.tag-link').popover('hide') 19 return false 20 }) 21 22 // nettoyage des formulaires 23 $.fn.clearForm = function () { 24 return this.each(function () { 25 const { type } = this 26 const tag = this.tagName.toLowerCase() 27 if (tag === 'form') { 28 return $(':input', this).clearForm() 29 } 30 if (type === 'text' || type === 'password' || tag === 'textarea') { 31 this.value = '' 32 } else if (type === 'checkbox' || type === 'radio') { 33 this.checked = false 34 } else if (tag === 'select') { 35 this.selectedIndex = -1 36 } 37 }) 38 } 39})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.