0

i inherited a site which uses the bootstrap.js / collapse for an accordion

i have been tasked to see if i can make the selected open accordion item be anchored 75px from the top, so if you open it, it will always be on show and clicking the next one will move the screen up etc

does anyone know if this is possible within the current bootstrap functionality

this is the code for the links, is there a data for what i want etc

<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">

sorry i have never used the bootstrap before

odd
  • 453
  • 2
  • 10
  • 21

1 Answers1

0

Bootstrap accordion has event methods that you can trigger off of:

$('#myCollapsible').on('show.bs.collapse', function () {
    // scroll page to this element
})

http://getbootstrap.com/javascript/#collapse

isherwood
  • 58,414
  • 16
  • 114
  • 157