Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
flexible-shipping
/
assets
/
js
:
contextual-info.min.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
(function($){$.fn.contextualInfo=function(settings){let config=$.extend({'id':'','phrases_in':[],'info_html':'','phrases_not_in':[],'is_limited_width':!1,},settings);return this.each(function(){let $element=$(this);createInfoHTMLElement($element);toggleInfoElement($element);$element.keyup(function(){toggleInfoElement($element)})});function prepareInfoElementId($element){return $element.attr('id')+"_"+config.id} function createInfoHTMLElement($element){$($element).after(function(){let classes=['description'];if(config.is_limited_width){classes.push('limited-width')} return'<p class="'+classes.join(' ')+'" id="'+prepareInfoElementId($element)+'" style="display: none;">'+config.info_html+"</p>"})} function toggleInfoElement($element){let element_value=$element.val().toLowerCase();let show_info=!1;if(config.phrases_in.length===0){show_info=!0} $(config.phrases_in).each(function(index,value){let phrase_value=value.toLowerCase();show_info=show_info||element_value.indexOf(phrase_value)!==-1});$(config.phrases_not_in).each(function(index,value){let phrase_value=value.toLowerCase();show_info=show_info&&element_value.indexOf(phrase_value)===-1});$('#'+$element.attr('id')+"_"+config.id).toggle(show_info)}}})(jQuery)