-
AuthorPosts
-
October 17, 2013 at 12:15 am #176751
Hey there,
I am looking to implement a ‘zoom’ for one of my images. I didn’t see anything offered for this within Enfold, so I purchased a simple jQuery code that would allow me this option.
http://codecanyon.net/item/epic-image-zoom/264395I can usually find my way around code fairly easily, but the ‘advanced layout editor’ I use with Enfold has me a bit perplexed as to where I would enter in the code required. I already uploaded the js files and updated the <head> tags in header.php — and so now I just need to adjust the code for the actual image.
Here is what they provided to initialize the zoom:
jQuery(document).ready(function($){
$(‘.images-that-need-zoom’).epicZoom({ magnification: 2,
hideCursor: true });
});Any suggestion on where/how to implement this code within Enfold would be most appreciated!
Thanks so much,
Jason
October 17, 2013 at 12:29 am #176761I suppose a simpler question might be:
How do I edit the code of my image within advanced layout?
Is this an impossibility? When I switch to the default editor everything is blank.
Thanks,
JasonOctober 17, 2013 at 5:46 am #176852Hey Jason,
Try creating a Text block element and putting the script on it (Text tab):
Regards,
JosueOctober 18, 2013 at 11:59 pm #177599Thanks Josue, that’s exactly what I was looking for.
However, I’m not sure if this is enfold.. but when I enter this code into the text box and save..
<img class="a" id="img4" src="http://godsfingerprints.net/wp-content/uploads/2013/10/fingerprint-roughcrop667.jpg" rel="http://godsfingerprints.net/wp-content/uploads/2013/10/fingerprint-roughcrop.jpg" />
It deletes the rel tag and leaves it
"<img alt="" src="http://godsfingerprints.net/wp-content/uploads/2013/10/fingerprint-roughcrop667.jpg" />
Any ideas why this would happen? It seems a bit strange. I need the rel tag for the code to work properly.
Thanks!
Jason- This reply was modified 11 years, 2 months ago by theworldawaits.
October 19, 2013 at 12:52 am #177605Hi!
It’s not Enfold but WordPress (TinyMCE), however here’s a workaround, go to your profile and disable the visual editor:
Now when you edit something you’ll do it only in Text mode, this way the HTML attributes won’t get removed.
Cheers!
JosueOctober 19, 2013 at 2:52 am #177662Sweet! You are awesome Josue, thanks!
October 19, 2013 at 2:58 am #177665You are welcome, glad we could help :)
Regards,
Josue -
AuthorPosts
- The topic ‘Help with jQuery’ is closed to new replies.