I was told by one of my friends in a high place that you can make a JPEG into a Container to carry what every you need..... My idea is to put a Java Script in the Container that makes the picture uncopyable to print page and right click..... Also would like to put a note pad into the Image for copywrites information. The Question is........ HOW DO YOU MAKE A JPEG IMAGE A CONTAINER......
stevenpetersen 35 Junior Poster
Recommended Answers
Jump to Post— codejoust 8Try this approach:
$(function(){ $('img').each(function(){ $(this).bind("rightclick mouseover mouseout drag",function(){return false;}); $('body').append('<div class="trans"> </div>').css({'width':$(this).width()+'px', 'height':$(this).height()+'px', 'position':'absolute', 'top':$(this).offset().top+'px', 'left':$(this).offset().left+'px', 'background':'transparent'}); }); });(this example using jquery)
Jump to Post— codejoust 8I'd you can give me a link (Or pm) I might be able to help.
To answer your question, you add it in a <script type="text/javascript">[my code]</script>
<script type="text/javascript" src="[scr of jquery]"></script>
Jump to Post— codejoust 8Correction =
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="path/to/my.js"></script>and probably in the header.
Jump to Post— codejoust 8Did you add the code?
My JS file is (sorry, I made a mistake).$(function(){ $('img').each(function(){ $('<div class="trans"> </div>').appendTo('body').css({ 'width':($(this).width() + 20)+'px', 'height':($(this).height() + 20)+'px', 'position':'absolute', 'top':$(this).offset().top+'px', 'left':$(this).offset().left+'px', 'background':'transparent'});}); $('img, .trans').bind("rightclick mousedown contextmenu mouseover mouseout drag",function(){return false;}); });Take that code and put it in a .js file, …
All 16 Replies
codejoust 8 Junior Poster
stevenpetersen 35 Junior Poster
codejoust 8 Junior Poster
codejoust 8 Junior Poster
stevenpetersen 35 Junior Poster
codejoust 8 Junior Poster
almostbob 866 Retired: passive income ROCKS
stevenpetersen 35 Junior Poster
stevenpetersen 35 Junior Poster
stevenpetersen 35 Junior Poster
almostbob 866 Retired: passive income ROCKS
almostbob 866 Retired: passive income ROCKS
codejoust 8 Junior Poster
stevenpetersen 35 Junior Poster
HI2Japan 23 Junior Poster
codejoust 8 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.