Closed (fixed)
Project:
Nivo Slider
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2010 at 21:47 UTC
Updated:
1 Dec 2011 at 07:10 UTC
I'm trying to set up a raw version of nivo on a drupal installation. (without module) I feel that i installed everything properly, but it still does not work.
Drupal 6 uses jquery 1.2.6 (if i'm not mistaken) and the Nivo demo includes jquery 1.4.2 from ajax.googleapis.com. Could that be the reason? I would love to upgrade but we are far away from that I see: #685060: Get ready for 1.4
tnx in advance.
Cheers,
Danny
Comments
Comment #1
danny_joris commentedI managed to upgrade to jQuery 1.3.2 with the jQuery module. The slider works now.
I still have an issue, but I don't think it's jQuery related. I have a views set up were I want to set up multiple sliders on one page. The demo learned me that I could call the slider multiple times if I called different id's. I did this, but it does not work yet. When I use the navigation of one nivo-slider, it will also change the image on the other slider.
I made a views template based on views-view-unformatted.tpl.php:
With a javascript line that calls this javascript function:
I don't see what I'm doing wrong yet.
Comment #2
danny_joris commentedI tried the following, but it doesn't fix it either. I thought this would be a better method because I could just use a clean '#nivo-0' as an id. The counter works nicely though. I receive a function call for both 'nivo-0' and 'nivo-1'.
I don't see the big difference between http://dev.dannyjoris.ca/portfolio and http://dannyjoris.ca/nivo-test/index.html ... (sorry for the messy images, its just meant to differentiate... :)
Based on: template file: views-view-field--portfolio--field-project-img-fid.tpl.php
While the updated version of jQuery is enabled with the 'jQuery update' module, I call the nivo library with theme.info: scripts[] = ../../libraries/nivo-1.7/jquery.nivo.slider.pack.js
Gilbert Pellegrom of dev7studios.com could not help me as he said he is not experienced with Drupal. He told that the many div's won't help to solve the issue. I can totally see his point. There is an overload of div's and span's. But how do I get rid of them?
Comment #3
escsco commentedI didn't have time to look through your code, but it's all in the template files to get rid of all those divs and spans. I spent a couple nights trying to make it work, and I didn't do a good job documenting my procedure. But basically look through the theme information in the view. For me I had to change the Field Content, the Row Style Output, and the Style Output to get it to work properly. This might solve your problem.
When I get a chance next week (and if you haven't solved this by then), I'll look through my theme to see what I did. You can take a look at the page I worked on, but it's only one slider. But at least you can see how I constructed my HTML using the templates. http://djbstang.com/
Comment #4
danny_joris commented@escsco : Thanks for your input. I manage to get 1 nivo slider work perfect on a page, but multiple sliders on one page fail. If you press next on one of the sliders, the others will flip images as well.
I just figured it out that for multiple nivo sliders to work on one page, I need at least jQuery v1.4.0. Drupal comes with jQuery v1.2.6 in core and the jQuery update module can upgrade it to v1.3.2 . I tried to use jQuery v1.3.2 on my working demo page, and it gave the same result as my dev. drupal site.
Unfortunately I read that an upgrade to v1.4.0 isn't possible yet because it conflicts with views 2. The issue queue for v1.4.0 is located here: #685060: Get ready for 1.4 .
Comment #5
devin carlson commentedPlease use the Views Nivo Slider module.
As was previously mentioned, the jQuery Update module can be used to update the version of jQuery included with Drupal 6 to past jQuery v1.4.0. It looks like work on making important Drupal 6 modules such as Views compatible with the latest version of jQuery is almost complete (see #1067290: Fix jQuery 1.7 for Drupal 6).