Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
Is this possible? (code request); jQuery Image Magnify
Topic Started: Aug 11 2009, 08:10 AM (248 Views)
Santa Nasir
Member Avatar
Member
[ * ]
NOTE: This is a ZB code question! Also I'm not a coder myself so I'd appreciate if you didn't ask me about coding stuff :)

Hi there.

I came across a script on http://www.dynamicdive.com named jQuery Image Magnify, here is the direct URL to the script: http://dynamicdrive.com/dynamicindex4/imagemagnify.htm.

I was wondering if it's possible to modify the code or make a whole new code that can be used in ZB which will add this to all IMG tags posted by users:
Code:
 
class="magnify" style="width:200px; height:150px" /

For example when someone posts an image the actual tag looks like this:
Code:
 
<img src="postedimage.jpg">

But the script would attach the code to the tag like this to make the magnifying possible:
Code:
 
<img src="postedimage.jpg" class="magnify" style="width:200px; height:150px" />

I'd be really glad and appreciative if someone could help me with the code. Thanks in advance.

P.S. I could have been posting in the wrong forum, all the forum rules everywhere made me confused on where I can actually post this. So sorry if it's in the wrong forum and please move it if needed.
Offline Profile Goto Top
 
Fission
Member Avatar
SRS BSNS
[ *  *  *  *  * ]
I believe it would be something like this:

Code:
 

$(".c_post img").addClass("magnify");


Offline Profile Goto Top
 
Santa Nasir
Member Avatar
Member
[ * ]
Fission
Aug 11 2009, 03:14 PM
I believe it would be something like this:

Code:
 

$(".c_post img").addClass("magnify");


Where do I exactly put that?
Offline Profile Goto Top
 
Santa Nasir
Member Avatar
Member
[ * ]
BUMP!
Offline Profile Goto Top
 
Lout
Member Avatar
Member
[ *  *  *  * ]
It needs to be between script tags for starters, and I have no idea if this will work but it's worth trying this as you're still waiting:-
Code:
 
<script type="text/javascript">
$(".c_post img").addClass("magnify");
</script>

Try it Below the board or Above the copyright.

Hope that helps you :) Lout crosses fingers...
Offline Profile Goto Top
 
Will
Member Avatar


In the future, please be aware that this is not a forum to make code requests.
The lovely folks in this category offer this type of service.

Use em'. ^_^
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Programming and Scripting Chat · Next Topic »
Locked Topic