Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a list of elements and all of their visibility is set to hidden within element one. In element two I click and the corresponding child element within element one becomes visible i.e.visibility — ImgBB[^][^]. I am setting up a google search link within element three, so whatever the innerhtml within the child element within element one is, should be copied into the google search link i.e.
<form action="http://google.com/search" target="_blank">
        <input id="spiderInject" name="q">
        <input type="submit">
    </form>


also part of the problem is that I have so many functions in my script it would take very much so, a lot of time to individually set an onclick function for each corresponding child element within element one.

What I have tried:

var $childNodes = $(".definition").children();
console.log($childNodes.filter('visibility: visible').text());

I tried the code here above and I received all the elements within element one but they were all the hidden elements i.e. elements-One-Through-Three — ImgBB[^]

full code in preview panel @repl i.e. https://repl.it/@MathewStratton1/AnotherDecisiveEyestrain#index.php[^]
Posted
Updated 4-Jan-21 5:50am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900