Skip to content
Advertisement

Fade in SQL results with jQuery

I have a php file that I have pulling in SQL elements from my database. My goal is that for each row of data that the div ‘moredetails’ would fade in on click (one at a time). However, the current script I am using only fades in the first result. So any row after that does not carry the function.

Here is my code:

Does anyone know if perhaps I need to rework the jQuery here with some sort of .each function or have I missed a step in the SQL/php side?

Note that the class “hidden” is in a css file that says: display:none

Advertisement

Answer

Like i mentioned in the above comment, use classes: https://jsfiddle.net/wwWaldi/3xy4woq7/54/

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement