- 0
Help needed in Javascript
Asked by
eangulus,
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
By Geezy · Posted
Steam with Proton isn't on Mac? -
By Geezy · Posted
https://youtube.com/watch?v=Oel0zjpKCwE -
By adrynalyne · Posted
Same, we had Macs. I had no trouble transitioning though. -
By News Staff · Posted
Visual Studio Professional 2022 + The Premium Learn to Code Bundle drops to lowest price by Steven Parker Today's highlighted deal comes via our Online Courses section of the Neowin Deals store, where you can save $1,960 on this Microsoft Visual Studio Professional 2022 + The 2024 Premium Learn to Code Certification Bundle. This deal consists of the following items: Microsoft Visual Studio Professional 2022 Learn to Code with Python 3 CHATGPT Series: OPENAI Fundamentals 2024 MySQL & SQL for Beginners The Complete Python Course: Learn Python by Doing in 2024 Google Assistant Automation IoT Development Computer Vision & Deep Learning with OpenCV and Python: Build 15 Projects JavaScript Complete Guide with Practical JavaScript Projects Web Development with Vuex (2024) Flutter & Dart: Complete Flutter Dart Programming Course Java Programming for Complete Beginners Salesforce Platform App Builder Certification Training ChatGPT for Salesforce Development 2024 Complete Ruby on Rails 6 Bootcamp Game Development and Coding for Kids 14 coding courses and nearly 244 hours of content.Here's deal: This Microsoft Visual Studio Professional 2022 + The 2024 Premium Learn to Code Certification Bundle normally costs $1,999, but you can pick it up for just $55.97 for a limited time, that's a saving of $1,943 (97%) off. For a full description, specs, and instructor info, click the link below. Use MSO8 when checking out for additional $8 off. Coupon Expires June 29. Get this bundle deal for just $41.97, or learn more Although priced in U.S. dollars, this deal is available for digital purchase worldwide. We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce. -
By TRS-80 · Posted
I still use "Everything Search" for all my device searches including OneDrive. It just got another update. Extremely fast because when you open it for the first time after a Windows Boot it caches everything. Takes a few seconds, but from the 2nd open on it finds all searches in real time as you type what you are searching for in the search area.
-
-
Recent Achievements
-
HarryTaylor earned a badge
One Month Later
-
HarryTaylor earned a badge
Week One Done
-
habso earned a badge
Week One Done
-
DXB APPS earned a badge
Week One Done
-
DecaffKnight94 earned a badge
One Month Later
-
-
Popular Contributors
-
Tell a friend
Question
eangulus
HI all I am having trouble getting a javascript to work as I want it.
The code is as follows:
the oc function is to search for a string in an array I found.
I want to call the script like this:
The call is not restricted to how many items 1 or 10...
What it has to do is toggle the display css for a div to hide/show content. by using multiple names in the onclick I should be able to toggle 2 items at once.
Also to avoid conflict I would like the div id's to have an operating extension as in:
products_toggle == toggle
products_show == force display: ; if it isn;t already
products_hide == force display: none; if it isn;t already
I am going nuts on trying to get this to work. I have had it work half way there but not all features at once. The code above opens and closes the items but doesn't close all others that are open. each div will be a content panel and the reason for the multiple id's is so I can open a page panel and then show the relevant sub content on that page. For example I might call about_open, contact this should force open the about panel and show a contact form. the using about_open, privacy it should open about panel if not already and show the privacy content while closing all other div's.
If needed I can abbreviated each toggled div with a name as in id="about_content", id="contact_content" etc.
Please help me.
Link to comment
https://www.neowin.net/forum/topic/631537-help-needed-in-javascript/Share on other sites
19 answers to this question
Recommended Posts