0

I use bootstrap 3.3.6, ui-bootstrap 1.2.2 and I try to use collapse. The header has to be an image. This is my code

 <div id="isOpen"  > 
    <img data-toggle="collapse" data-target="#readThis" src="./images/hello.jpg" /> 
    <div id="readThis" > Get more info</div>

 </div>    

The readThis div appears opened and when I click the image to close it, it starts to close, and then re-opens.

After that works fine.

How do I fix this? Is there another bootstarp module that will work with images? I try to fix this all day, please help.

Thanks

slevin
  • 4,166
  • 20
  • 69
  • 129

1 Answers1

1

try by putting data-toggle="collapse" data-target="#readThis" on <a> tag and put image inside it

<a href="#readThis" data-toggle="collapse">
   <img src="./images/hello.jpg" />
</a>
Ismail Farooq
  • 6,309
  • 1
  • 27
  • 47