21278 Posts in 5728 Topics by 2599 members
| Go to End | Next > | |
| Author | Topic: | 3120 Views |
-
Re: Replace big img Javascript problem

20 November 2009 at 12:31am
Think I have the javascript files added correctly now, and now I get another error..
$("ul.gallery").galleria is not a function
-
Re: Replace big img Javascript problem

20 November 2009 at 12:45am
Try the following:
<script type="text/javascript">
;(function($) {
$(function(){
$('ul.gallery').galleria();
});
})(jQuery);
</script> -
Re: Replace big img Javascript problem

20 November 2009 at 1:37am
Are you sure all files are being included and loaded correctly? Best way to check this is probably the "Net" tab in firebug. Also make sure you don't include files twice (via Requirements::javascript and/or directly in code).
-
Re: Replace big img Javascript problem

21 November 2009 at 12:50am
yes, have checked the firebug net and it says that they are being added correctly, and no they are not included twice..
But still get "jQuery is not defined" error.
-
Re: Replace big img Javascript problem

21 November 2009 at 2:18am
Did a quick search online and found someone that wrote:
"jQuery 1.3.2 no longer uses the @ convention and this is why galleria is choking. The simple fix to make Galleria work with jQuery 1.3.2 is to open your galleria.js file and replace all occurrences of @rel with rel"
Tried to find the @rel, but that must have been fixed..?
-
Re: Replace big img Javascript problem

21 November 2009 at 2:26am
Or you could use jQuery 1.2.6: http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js
-
Re: Replace big img Javascript problem

21 November 2009 at 2:42am Last edited: 21 November 2009 3:21am
No, that didn't work. Have tried the other version of jQuery to, but still get the same error message.
This is starting to get a little frustrating..
Here's how I have added it:
In page.php (firebug says it loads fine, and yes I did try to add those in page.ss head tag to):
Requirements::javascript("themes/tutorial/js/jquery.galleria.js");
Requirements::javascript("themes/tutorial/js/jquery.min.js");In articlepage.ss
<ul class="gallery">
<% control Attachment %>
<li><a href="$SetWidth(470).Link" title="$Title">$SetWidth(70)</a></li>
<% end_control %>
</ul>As far as I can see in the usage part on the galleria website, you only need to add ul class gallery and add the images in a il list.
| 3120 Views | ||
| Go to Top | Next > |


