Forum Moderators: open

Message Too Old, No Replies

newbie. two javascript plugins not playing together

         

spcohen

5:02 pm on Jul 4, 2010 (gmt 0)

10+ Year Member



I have a really quick question about two javascript plugins I am trying to use together.. I am using some javascript called galleria (http://galleria.aino.se/).. in full screen mode. I want to do is use MojoMagnify (http://www.nihilogic.dk/labs/mojomagnify/) on top of the image in the gallery so the user can magnify parts of the image..

For some reason, mojoMagnify isn't displaying..

if you can help me fix this, you are a God among men!

you can see it here:
www.sirtuesday.com/mojo

Brett_Tabke

1:00 pm on Jul 5, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Welcome to the boards. Your best bet is to contact the author of those two pieces of software. Have you talked with them?

We tend to want specific issues with code here. Big & bold, "here is the code - please fix it" type posts generally don't lead to good answers spcohen. Members jump all over the more specific issues with code that people can share.

You could also leave a post in the commercial forum to hire a javascript developer with a project that large. [webmasterworld.com...]

Fotiman

2:46 pm on Jul 5, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I took a quick peek at the code and it looks like you have the data-magnifysrc attribute on the wrong elements. You have them on the <a> element, but the mojomagnify script is looking for this attribute on the <img> element.

spcohen

3:14 pm on Jul 5, 2010 (gmt 0)

10+ Year Member



thanks Fotiman.... I did try that, and didn't have any luck..

apologies Brett_Tabke, thanks for the 411.. I did actually email both authors and haven't heard back... guess they are either swamped or not able to support...

here's the code.
<!DOCTYPE html>
<html lang="sv"><head>
<title>mojo test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script src="js/galleria.js"></script>

<script type="text/javascript" src="js/mojomagnify.js"></script>
<link type="text/css" href="js/mojomagnify.css" rel="stylesheet" />

<style>
</style>
</head>

<body>

<div id="galleria">
<img src="kb.jpg" data-magnifysrc="ks.jpg" id="myimage" title="MYTITLE"> <img src="ks.jpg" title="IMAGE TITLE" ></a>
<img src="1.jpg" data-magnifysrc="1.jpg" id="myimage" title="MYTITLE"> <img src="1.jpg" title="IMAGE TITLE" ></a>

</div>


<script type="text/javascript">
// Load theme
Galleria.loadTheme('js/galleria.fullscreen.js');

// run galleria and add some options

$('#galleria').galleria({
image_crop: false,
transition: 'fade',
data_config: function(img) {
return {
description: $(img).next('p').html()
};
}
});


</script>


</body>
</html>

spcohen

4:42 pm on Jul 6, 2010 (gmt 0)

10+ Year Member



anyone?

Fotiman

6:11 pm on Jul 6, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Just a thought... try moving your mojomagnify.js script to be the last script on the page (move it below the script that does Galleria.loadTheme... etc.)