rr
By
MD ASIF
<style>code, pre, mark{-webkit-user-select:all !important;-khtml-user-select:all !important;-moz-user-select:all !important;-ms-user-select:all !important;user-select:all !important}
</style><script>//<![CDATA[
jQuery.fn.selectText=function(){this.find('input').each(function(){if($(this).prev().length==0||!$(this).prev().hasClass('p_copy')){$('<p class="p_copy" style="position: absolute; z-index: -1;"></p>').insertBefore($(this))}
$(this).prev().html($(this).val())});var doc=document;var element=this[0];console.log(this,element);if(doc.body.createTextRange){var range=document.body.createTextRange();range.moveToElementText(element);range.select();document.execCommand('copy')}else if(window.getSelection){var selection=window.getSelection();var range=document.createRange();range.selectNodeContents(element);selection.removeAllRanges();selection.addRange(range);document.execCommand('copy')}}
$('pre, code, mark').on('click', function(e) {
var selector = $(this);
$(selector).selectText();
e.preventDefault();
alert("Your Text is asuccessfully copied to clipboard");
});//]]></script>
Blogger Random – Recent – Specific Label Posts Widget – All in One Post Feed Widget
SEARCH
LATEST
15-latest-40px
SECCIONS
Search This Blog
Powered by Blogger.
Blog Archive
Popular
-
[posts--tag:Open Source--50]
-
<style>code, pre, mark{-webkit-user-select:all !important;-khtml-user-select:all !important;-moz-user-select:all !important;-ms-user-s...
No comments:
Post a Comment