Closed (fixed)
Project:
Views carousel
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2009 at 05:37 UTC
Updated:
12 Sep 2011 at 06:46 UTC
Hi,
This is a great module. As I was playing around with this module, I though, having previous and next arrows on a carousel which scrolls automatically is unnecessary. I have created a patch that adds an option to hide navigation arrows if the autoscroll is enabled (i.e. autoscroll value is > 0). I had to modify the uncompressed "jquery.jcarousel.js" file for this feature. I have re-compressed the "jquery.jcarousel.js" file using YUI Compressor.
If you apply this patch, it will add an option to hide/show navigation under Views Carousel settings (right below the autoscroll field).
Chintu
| Comment | File | Size | Author |
|---|---|---|---|
| viewscarousel-6.x-1.x-dev-hide-arrows.patch | 34.53 KB | zd370 |
Comments
Comment #1
robloachYou shouldn't change jquery.jcarousel.js at all as next time we update it, it would break this functionality. Wouldn't it be eaiser to just use CSS to hide the arrows?
Comment #2
zd370 commentedRob,
Thanks for looking into this. I did try to create this functionality using CSS first, but the problem was it would still print out the code for navigation arrows and even though I set them to display: none, they were still clickable. But of course, I could give it try a again.
Chintu
Comment #3
gthing commentedI'm trying to hide the arrows with css but my css is being overridden by the div call itself. It has div id style="display:block">
I have no idea where that code is to change it.
Comment #4
robloachYou could probably set width and height to 0, or margin-left to -9999999px.
Comment #5
mfer commentedIf you want to hide the arrows set the overflow to hidden and the width and height to 0. Or, set them to display: none;
No altering the js which is an external library.
Comment #6
El Bandito commentedGthing
I found that you can override the hardcoded style declaration by marking the CSS display:none as important e.g.
div.jcarousel-next {display:none !important;}Cheers
Dave
Comment #8
Oleksa-1 commentedThx, Daves! Exactly what I need to disable inactive arrows:
div.jcarousel-prev-disabled {display:none !important;}
div.jcarousel-next-disabled {display:none !important;}
Comment #9
thushad commentedthis will not enough for ie 6. Because ie6 doesn't care for "!important" attribute. Using visibility:hidden with the display:none will give you a better cross browser solution.
div.jcarousel-prev-disabled {display:none !important; visibility:hidden;}
div.jcarousel-next-disabled {display:none !important; visibility:hidden;}