How to disable text selection in blog


Step-1 : Go to your blogger Dashboard  
Step-2 : Select option Layout from the left side menu in Dashboard
Step-3 : Click on Add to Gadget  
Step-4 : Choose HTML/Javascript option  
Step-5 : Now copy and paste the following code  
Step-6 : Done !!! Now text selection has been disable in your blog 



//disable text selection by http://tips4blog.blogspot.in/

var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}


Powered by Blog Tips by KP