I am having difficulties to code a simple jquery enlarge image feature on a image however i do not want plugins. So when you click on a image it pops up and enlarges the image size and when you click on "x" it closes the enlarge image.
Asked
Active
Viewed 2,098 times
-3
-
You should write your own code if you don't want plugin.... so you should build your popup window and zoom[in|out] features... good work and enjoy yourself... :-) – Fabio Buda Jan 20 '12 at 14:35
-
3StackOverflow is not rent-a-coder, what is your question that isn't "can you build this for me"? – JaredMcAteer Jan 20 '12 at 14:35
-
i thought license issue may occur? – user929153 Jan 20 '12 at 14:35
-
Have you written any code for this so far? If so, post it so that the community can help you with it. – Carol Skelly Jan 20 '12 at 14:54
2 Answers
0
Just us www.fancybox.net. If you really not want to use any plugin you will still endup with the samecode as one plugin.
Do something like this if you really want not to use a plugin.
$(document).ready(function () {
$("img").toggle(function () {
var width = $(this).attr("width");
var height = $(this).attr("height");
// Add function for displaying
}, function () {
// Add function for closing
})
})

Simon Edström
- 6,461
- 7
- 32
- 52
0
You could use zoom css for this (but not supported in all browsers yet)
$('#myImage').css({zoom: '200%'})

terjeto
- 386
- 2
- 13