Hi, looking at this example of Plunker:
http://plnkr.co/edit/z0bnxjV2XkBZC0yJxL7Z?p=preview
can some one please tell my why does each answer and each question coming from the JSON file show twice?
Hi, looking at this example of Plunker:
http://plnkr.co/edit/z0bnxjV2XkBZC0yJxL7Z?p=preview
can some one please tell my why does each answer and each question coming from the JSON file show twice?
Everything is showing up only once for me. I see exactly three different questions/answers. Did you get it fixed?!
Hi,
Thanks for your help. Meanwhile I fixed that issue.
However now I have another problem with the same example.
I want that if I click on one of the select boxes (with the question), the div right after it (with the answer), slides up. To achieve this, I wrote this code:
// Event Delegation
$('#container').on('click', '.my-select', function() {
$(this).next(".my-div").slideToggle();
});
It works fine. But I have to click a select box twice to fire up the slideToggle event.
Why is that and how can I fix it?
Thanks
I only have to click once. The selection box seems like the wrong control for the job, no?