Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9045653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:24:07+00:00 2026-06-16T11:24:07+00:00

I am using the latest version of Zurb’s Foundation prototyping framework. It isn’t entirely

  • 0

I am using the latest version of Zurb’s Foundation prototyping framework. It isn’t entirely necessary that you have any experience with this specific product though it helps for context.

One of the tools included in the framework is the JQuery accordion – however they have made some custom style modifications. One of the issues this appears to have created is that whenever you click ANYWHERE inside the content pane, that pane collapses. I have a JQuery based form element that I need to be able to use inside this accordion. The problem is, the second you click on the textbox, or anywhere else in the accordion for that matter it collapses the panel. Another difference from JQuery’s standard UI accordion is that all the panels can be collapsed at once, I don’t want or need this. In fact if it weren’t for the styling of Zurb’s accordion I would just download JQuery’s accordion and use that. However, that isn’t an option and after several hours of trying to solve the problem I realized it was time to consult the experts. Any Suggestions would be GREATLY appreciated. Also, I know there are several questions similar to this posted around, however none address this specific issue and my expertise is in PHP, not Jquery. Please take a look and lend a hand if you can! Thank you in advance.

Zurb foundation: http://foundation.zurb.com/
Zurb foundation Accordion UI: http://foundation.zurb.com/docs/elements.php (scroll down to accordion)

Actual JQuery Script for accordion:

;(function ($, window, undefined){
  'use strict';

   $.fn.foundationAccordion = function (options) {
     var $accordion = $('.accordion');

     if ($accordion.hasClass('click') && !Modernizr.touch) {
      $('.accordion li', this).on({
        mouseenter : function () {
          var p = $(this).parent(),
            flyout = $(this).children('.content').first();

          $('.content', p).not(flyout).hide().parent('li').removeClass('active'); //changed this
          flyout.show(0, function () {
            flyout.parent('li').addClass('active');
          });
        }
      });
    } else {
      $('.accordion li', this).on('click.fndtn', function () {
        var li = $(this),
            p = $(this).parent(),
            flyout = $(this).children('.content').first();

        if (li.hasClass('active')) {
          p.find('li').removeClass('active').end().find('.content').hide();
        } else {
          $('.content', p).not(flyout).hide().parent('li').removeClass('active'); //changed this
          flyout.show(0, function () {
            flyout.parent('li').addClass('active');
          });
        }
      });
    }

  };

})( jQuery, this );
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T11:24:09+00:00Added an answer on June 16, 2026 at 11:24 am

    I solved this by putting an event handler on elements inside the accordion and then calling stopPropagation() on the event to prevent it from bubbling up to the element the accordion click handler is bound to.

    Example:

    function handle_click(event) {
      event.stopPropagation();
      // your event code
    }
    
    $('ul.accordion').('click', 'li div.my_class', handle_click);
    

    So in the example above, you should wrap your form inside the div.my_class element so that clicking outside the element, regular accordion collapse behavior occurs, but inside your form, the click event won’t collapse the accordion.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using latest version of NDK android-ndk-r8b I have some files that were builded
Using the latest version of EasyMock, I have a method that I need to
I'm using XAMPP (latest version) on OS 10.6.2, that's bundled with PHP 5.3.0 I
I am using the latest version of protobuf-net with VS2008 integration. I have created
Im using latest TCPDF version(5.9). But have some strange problems with encoding. I need
I have been using YuiCompressorTask (latest version) on my project for a very long
I'm using the latest version of Eclipse Galileo and I have to access the
I am using the latest version of Cocos2D and Particle Designer and I have
I am using the latest version of inno that does the following during setup:
I'm using the latest version of Bootstrap to style a site and I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.