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

  • Home
  • SEARCH
  • 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 7847009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:46:06+00:00 2026-06-02T17:46:06+00:00

I got help with the code below from you guys on forum and the

  • 0

I got help with the code below from you guys on forum and the code works perfectly, but client threw a curve ball. How do I stop/break execution when selection has been found in this jquery code? They want the same fieldset to display for a couple of project type selections. But since the code continues running it turns off the FS if the same ‘sect_id’ is appears. How do I put in a break, so when it finds the matching value, it just stops searching?

$('fieldset#section-841', 'fieldset#section-837' ).hide();
    var DM_projtype = new Array(
        {value : 'Direct Mail', sect_id : 'fieldset#section-841'},
        {value : 'Multiples2-92', sect_id : 'fieldset#section-837'},
        {value : 'Multiples10+', sect_id : 'fieldset#section-837'}
    );
    $('select#3596').on('change',function() {
        var thisValue = $(this).val();
        var sect_id = '';
        $(DM_projtype).each(function()
        {
           $(this.sect_id).hide();
           if(this.value == thisValue)
               $(this.sect_id).show();
       });

   });
)
  • 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-02T17:46:07+00:00Added an answer on June 2, 2026 at 5:46 pm

    Just add return false. See below,

       $(DM_projtype).each(function()
       {
           $(this.sect_id).hide();
    
           if(this.value == thisValue) {
              $(this.sect_id).show();
              return false; // will break out of loop
           }
    
       });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please help, I got the code below from a book but it doesnt seem
I got the code below from the bitmapmixer sample (DirectShow.NET) and i tried to
I want to pick photo from contacts . I got below code from stack
I got a code from internet, the code below is picking the contact and
I've a got a code snippet below modified from http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.webpart.aspx : public class WebPartBla
In the below code i got the value from the database and display in
I got some code off the Internet and now I just need help to
I need help... I got errors with my android xml... Here's the code: <?xml
I got help with correct calculation the other day but I've hit a block
I've got a Ruby TCPSocket client that works great except when I'm trying to

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.