/** * * @package Post Numbers * @copyright (c) 2016 kasimi - https://kasimi.net * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ jQuery(function($) { // Clipboard plugin $.fn.toClipboard = function(o) { return this.each(function() { var success = false; var text = o.text.call(this); if (document.execCommand) { var temp = document.createElement('input'); temp.value = text; temp.style.position = 'fixed'; temp.style.opacity = 0; temp.style.top = 0; document.body.appendChild(temp); try { temp.select(); success = document.execCommand('cut') && temp.value === ''; } catch (e) { if (typeof console !== 'undefined' && console.log) { console.log('execCommand() error: ' + e); } } finally { document.body.removeChild(temp); } } o[success ? 'success' : 'error'].call(this, text); }); }; // Tooltip plugin $.fn.tooltip = function(o) { return this.each(function() { var $container = $('