Closed (fixed)
Project:
Quick Tabs
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Feb 2019 at 03:54 UTC
Updated:
22 May 2025 at 02:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
brooke_heaton commentedThe attached patch adds a quicktabsmemory behavior to Drupal.behaviors in quicktabs.js and makes uses of jQuery Cookie to set the active tab to the last tab clicked. This is specific to the Quicktabs display.
Comment #3
brooke_heaton commentedUpdate patch to include addition of jquery.cookie library.
Comment #4
johnnydarkko commentedComment #5
gibbo1715 commentedI found initially this didn't work for me but if you have the same issue it is not the patch, it is to do with ensuring cookies are enabled in your browser. I had enabled the prevent cross site tracking on my Mac and that prevents this patch from working, just disable it and you are good to go.
Comment #6
markdcThis works for me. Thanks!
Comment #7
kekkisI reorganised the patch, cleaned up some coding style (from PhpStorm suggestions), and changed the patch to use
jQuery.data(). This way I could get this to work even when clicking on the tabs multiple times. With the #3 patch I could only get the cookie to be set once per each page load (if I wanted to reset the cookie into a different value between two tabs, I needed to reload the page).Comment #8
sarathkmPointing to drupal 7 version
Comment #10
shelane