Jump to content

need to adjust script to work on certian areas of page only


webguync

Recommended Posts

I have some javascript which makes all text on a page unselectable. Works great. I only want some of the text unselectable though, not all on the page. I can give the text I need selected a class, but how would I adjust the JS?

 

below is the code

 

<script type="text/javascript">
document.onselectstart=new Function('return false');function ds(e){return false;}function ra(){return true;}document.onmousedown=ds;document.onclick=ra;
</script>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.