i need help about this JQuery code again i really have a little experience with JQuery so sorry if the question is a mess..
ill credit http://www.w3schools.com for this one since i copied it from them
//the JS code
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
});
});
<p class="flip">click to view full credit report details</p>
<div class='panel'>
<?php
display_column_name($table_name,$table_id);
?>
</div>
ok so the code is actually looped it repeats depending on how many data i have in my database so the problem right now is when i click on “Click to view full credit report details” it opens everything.. what i want is when i click on that it only opens that portion… and not the others… any idea about this? i really need help thanks 🙂
You should have dynamic id for each p element. which calls div with another dynamically setted id.
in your loop you could do like this
and your html, this should be within loop as well
OR
Second method
tHIS CODE INSIDE LOOP
javascript function outside loop
Where
$id_from_databaseis the unique id of the records that come from database.