Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,584 members, 7,958,804 topics. Date: Thursday, 26 September 2024 at 01:52 AM |
Nairaland Forum / Science/Technology / Webmasters / Javascript Geeks Please Come In (435 Views)
Nairalanders Please Come To My Rescue From Domainking / Please Come In Portharcourt Webmasters / Website Geeks Get In Here! (2) (3) (4)
Javascript Geeks Please Come In by Tccomms: 12:08pm On May 21, 2021 |
Please I'm trying to achieve something. I have this lines of js that disables a select ion option like this <select> <option>A</option> <option class="disable" >B</option> <option>C</option> <option class=" disable">Door</option> </select> Then the JS is let elements = document.getElementsByClassName("disable" doIt(elements, true); function doIt(elements, status){ for(var i =0; i < elements.length; i++){ elements [i].disabled = status; } } Following the same method using array and class how can I achieve hiding the options with the class name disable |
Re: Javascript Geeks Please Come In by Jas80: 4:24pm On May 22, 2021 |
Tccomms: Are you talking about hiding the elements?, Something like visibility hidden or display none? |
Re: Javascript Geeks Please Come In by Tccomms: 12:36am On May 23, 2021 |
Jas80: Yes I was Thanks for responding but I have gotten the solution |
Re: Javascript Geeks Please Come In by Jas80: 10:17am On May 23, 2021 |
Tccomms:No issue bro, u r welcome |
Re: Javascript Geeks Please Come In by Dujardin(m): 8:56am On May 25, 2021 |
Post what you did right, your question and answer may help someone in the future. Think stackoverflow Tccomms: |
(1) (Reply)
Magnetic Video Marketing Review: The Best Video Marketing Guide In The Market / Five Headaches Bloggers Get- Discover And Treat / $1000 Top Seller Contest
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9 |