Hello,

So I was working with php, jquery, javascript and html to make a show/hide toggle system.
I use php to fetch some data from my database and display them using html. I use jquery to make the show/hide toggle functionality. However, as I rely on php's while loop I can't actually point to one specific element so when I click a button to toggle visibility, every element is affected but I want only 1 element which is inside the same div as the toggle button which that was clicked. How can I accompanish this?

Thanks in advance,
Nahiyan

Could you post any related code (while loop, call, display, etc)?

You could use $("#id"); in jQuery and give everything id's, and knowing that all elements in a div will inerit the properties of the parent element(I think) .

Thanks a lot everyone :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.