break; case 'selectize': $output .= sprintf('jQuery("%s").selectize({plugins: ["remove_button"]});', $selector); break; } if ($on_document_ready) { $output .= '});'; } $output .= '}'; // typeof jQuery $output .= '</script>'; } return $output; } public static function render_add_titles($selector) { $output = '<script type="text/javascript">'; $output .= 'if ( typeof jQuery !== "undefined" ) {'; $output .= sprintf('jQuery("%s").each(', $selector); $output .= 'function(){'; $output .= 'var title = jQuery(this).html().replace( /(<\\/[^>]+>)/igm , "$1 ");'; $output .= 'jQuery(this).attr("title", this.innerText || jQuery(jQuery.parseHTML(title)).text().replace(/\\s+/igm, " ") );'; $output .= '}'; $output .= ');'; $output .= '}'; $output .= '</script>'; return $output; } } Groups_UIE::init();