Active
Project:
Views Accordion
Version:
7.x-1.0-rc2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2013 at 13:08 UTC
Updated:
21 Sep 2015 at 10:25 UTC
Jump to comment: Most recent
Comments
Comment #1
GuyRus commentedI'm after the same functionality. I've got the links in there (add all the fields you want in the header and exclude from display then rewrite the title output) but when clicked on the links don't do anything due to the header onClick overriding them.
Wondering if you came up with a solution for this?
Comment #2
michaelw_dc commentedOne way to tackle this is to capture the click on the link with jQuery and set the window.location to the href of the link. I created a javascript file, "links_within_accordion_header.js" and added it in via my theme's .info file (it was just a one-page site, so it was fine having it on every page of the site).
jQuery(document).ready(function() {
jQuery(".ui-accordion a").click(function() {
window.location = jQuery(this).attr('href');
return false;
});
});
Comment #3
narkoff commented#2 worked for me. Thanks. I used the JS Injector module to limit the jQuery to certain pages.
Comment #4
anil280988 commentedViews Nested Accordion can be use for this purpose. I creates a new view style, Views Nested Accordion, which inherits the Views Accordion style.
https://www.drupal.org/project/views_nested_accordion
Comment #5
satutama commentedI tried #2 with JS injector, doesnt matter where i put it and how i put it, it just doesn't work.
And then i tried #4, and still it doesn't work.
I managed to make the link work by forcing the link in the rewrite results of the header field.
I'm using 2 fields as a header, and instead of: [field_1] [field_2]
I put [field_1][field_2]
Comment #6
urmila26 commentedHi
i have tried by using jquery , it is working good.
but without using jquery , should i add link for accordion header in drupal 7??